Plotting Modules

This commit is contained in:
Luis Fernando Molina committed 2020-06-16 12:16:40 +02:00
1 parent 31d10d09e0
commit 1ed6a48488
10 files changed
+258 -6

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
function newNodesErrors () {
const MODULE_NAME = 'Nodes Errors'
const logger = newWebDebugLog()
logger.fileName = MODULE_NAME
let thisObject = {
onRecordChange: onRecordChange,
initialize: initialize,
finalize: finalize
}
let rootNode
return thisObject
function finalize () {
rootNode = undefined
}
function initialize (pRootNode) {
rootNode = pRootNode
}
function onRecordChange (currentRecord) {
evalNode(rootNode, currentRecord.array, 0, applyError)
}
function applyError (node, errorMessage) {
if (node.payload === undefined) { return }
if (node.payload.uiObject === undefined) { return }
if (errorMessage === '') {
node.payload.uiObject.resetErrorMessage(errorMessage)
} else {
node.payload.uiObject.setErrorMessage(errorMessage)
}
}
}