Decimals Handling Improved

This commit is contained in:
Luis Fernando Molina committed 2020-08-21 17:33:27 +02:00
1 parent 90300e5cdc
commit eda2b14064
3 files changed
+16 -13

No files matched your search

+4 -4
View File
@@ -95,14 +95,14 @@ function newRecordValues() {
pointing to the same property at the Target Node.
*/
if (property.config.childProperty !== undefined) {
applyValue(targetNode[property.config.childProperty], value)
applyValue(targetNode[property.config.childProperty], value, property.config.decimals)
} else {
applyValue(targetNode[property.config.codeName], value)
applyValue(targetNode[property.config.codeName], value, property.config.decimals)
}
}
}
function applyValue(node, value) {
function applyValue(node, value, minDecimals) {
if (canvas.chartingSpace.visible !== true) { return }
if (node === undefined) { return }
if (node === undefined) { return }
@@ -110,6 +110,6 @@ function newRecordValues() {
if (node.payload.uiObject === undefined) { return }
if (value === true) { value = 'true' }
if (value === false) { value = 'false' }
node.payload.uiObject.setValue(value, 1)
node.payload.uiObject.setValue(value, 1, minDecimals)
}
}