Warning improved
This commit is contained in:
1 parent
479d11bca2
commit
b4a6931be4
4 files changed
+22
-25
No files matched your search
@@ -8,16 +8,15 @@ function newNodesErrors() {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
let hiriarchyMap
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = UI.projects.superalgos.utilities.hierarchy.getHiriarchyMap(rootNode)
|
||||
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
@@ -32,16 +31,16 @@ function newNodesErrors() {
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
async function applyValue(nodeId, value) {
|
||||
if (UI.projects.superalgos.spaces.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
let node = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeById(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === '') {
|
||||
node.payload.uiObject.resetErrorMessage()
|
||||
} else {
|
||||
node.payload.uiObject.setErrorMessage(value, 10)
|
||||
node.payload.uiObject.setErrorMessage(value, 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,16 +8,15 @@ function newNodesInfos() {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
let hiriarchyMap
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = UI.projects.superalgos.utilities.hierarchy.getHiriarchyMap(rootNode)
|
||||
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
@@ -32,16 +31,16 @@ function newNodesInfos() {
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
async function applyValue(nodeId, value) {
|
||||
if (UI.projects.superalgos.spaces.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
let node = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeById(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === '') {
|
||||
node.payload.uiObject.resetInfoMessage()
|
||||
} else {
|
||||
node.payload.uiObject.setInfoMessage(value, 10)
|
||||
node.payload.uiObject.setInfoMessage(value, 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,16 +8,15 @@ function newNodesWarnings() {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
let hiriarchyMap
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
hiriarchyMap = undefined
|
||||
|
||||
}
|
||||
|
||||
function initialize(pRootNode) {
|
||||
let rootNode = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadsById(pRootNode.id)
|
||||
hiriarchyMap = UI.projects.superalgos.utilities.hierarchy.getHiriarchyMap(rootNode)
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function onRecordChange(currentRecord) {
|
||||
@@ -32,16 +31,16 @@ function newNodesWarnings() {
|
||||
}
|
||||
}
|
||||
|
||||
function applyValue(nodeId, value) {
|
||||
async function applyValue(nodeId, value) {
|
||||
if (UI.projects.superalgos.spaces.chartingSpace.visible !== true) { return }
|
||||
let node = hiriarchyMap.get(nodeId)
|
||||
let node = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeById(nodeId)
|
||||
if (node === undefined) { return }
|
||||
if (node.payload === undefined) { return }
|
||||
if (node.payload.uiObject === undefined) { return }
|
||||
if (value === '') {
|
||||
node.payload.uiObject.resetWarningMessage()
|
||||
} else {
|
||||
node.payload.uiObject.setWarningMessage(value, 10)
|
||||
node.payload.uiObject.setWarningMessage(value, 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2095,7 +2095,7 @@ function newUiObject() {
|
||||
browserCanvasContext.closePath()
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.DARK_TURQUOISE + ', ' + OPACITY + ')'
|
||||
browserCanvasContext.lineWidth = 5
|
||||
browserCanvasContext.setLineDash([0 + infoRingAnimation, 10 - infoRingAnimation])
|
||||
browserCanvasContext.setLineDash([2 + infoRingAnimation, 14 - infoRingAnimation])
|
||||
browserCanvasContext.stroke()
|
||||
}
|
||||
|
||||
@@ -2111,7 +2111,7 @@ function newUiObject() {
|
||||
browserCanvasContext.closePath()
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', ' + OPACITY + ')'
|
||||
browserCanvasContext.lineWidth = 5
|
||||
browserCanvasContext.setLineDash([0 + warningRingAnimation, 10 - warningRingAnimation])
|
||||
browserCanvasContext.setLineDash([2 + warningRingAnimation, 14 - warningRingAnimation])
|
||||
browserCanvasContext.stroke()
|
||||
}
|
||||
|
||||
@@ -2127,7 +2127,7 @@ function newUiObject() {
|
||||
browserCanvasContext.closePath()
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.RED + ', ' + OPACITY + ')'
|
||||
browserCanvasContext.lineWidth = 5
|
||||
browserCanvasContext.setLineDash([0 + errorRingAnimation, 10 - errorRingAnimation])
|
||||
browserCanvasContext.setLineDash([2 + errorRingAnimation, 14 - errorRingAnimation])
|
||||
browserCanvasContext.stroke()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user