Bug Fixed
This commit is contained in:
1 parent
c6ee916cc7
commit
d86a4862ca
2 files changed
+26
-3
No files matched your search
@@ -282,6 +282,16 @@ function newPlotter() {
|
||||
}
|
||||
}
|
||||
|
||||
if (productDefinition.config.nodePathType === 'array') {
|
||||
/*
|
||||
When we have an array configuration, we know that the last field of the record
|
||||
contains the array index, which is needed to correctly plot this data. Since
|
||||
this index is not part of the product definition, we will restore its value in
|
||||
this way:
|
||||
*/
|
||||
record.index = dataFile[i][recordDefinition.properties.length]
|
||||
}
|
||||
|
||||
if (
|
||||
(record.begin >= farLeftDate.valueOf() && record.end <= farRightDate.valueOf()) &&
|
||||
(record.end >= coordinateSystem.min.x && record.begin <= coordinateSystem.max.x)
|
||||
|
||||
@@ -59,11 +59,15 @@ function newRecordValues() {
|
||||
function scanProperties(productRootNode, index) {
|
||||
for (let i = 0; i < productDefinition.record.properties.length; i++) {
|
||||
let property = productDefinition.record.properties[i]
|
||||
let key = property.id
|
||||
if (index !== undefined) {
|
||||
key = property.id + '-' + index
|
||||
}
|
||||
if (property.config.nodePath !== undefined) {
|
||||
let propertyRoot = eval(property.config.nodePath)
|
||||
propertyTargetNodeMap.set(property.id, propertyRoot)
|
||||
propertyTargetNodeMap.set(key, propertyRoot)
|
||||
} else {
|
||||
propertyTargetNodeMap.set(property.id, productRootNode)
|
||||
propertyTargetNodeMap.set(key, productRootNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +78,16 @@ function newRecordValues() {
|
||||
for (let i = 0; i < productDefinition.record.properties.length; i++) {
|
||||
let property = productDefinition.record.properties[i]
|
||||
let value = currentRecord[property.config.codeName]
|
||||
let targetNode = propertyTargetNodeMap.get(property.id)
|
||||
let key = property.id
|
||||
if (productDefinition.config.nodePathType === 'array') {
|
||||
/*
|
||||
When we have an array configuration, in this case we will use the index
|
||||
property that was injected into the record in order to build the key to
|
||||
get the node where we have to send the value.
|
||||
*/
|
||||
key = property.id + '-' + currentRecord.index
|
||||
}
|
||||
let targetNode = propertyTargetNodeMap.get(key)
|
||||
/*
|
||||
If the codeName of the Record Property can not match the name of the property at
|
||||
the target node, the user can explicitly specify the property name at the configuration,
|
||||
|
||||
Reference in new issue
Block a user