Process Instance with reference Parent
This commit is contained in:
1 parent
58eab44f03
commit
5c3b669150
4 files changed
+84
-6
No files matched your search
@@ -204,6 +204,13 @@ function newCanvas () {
|
||||
}
|
||||
}
|
||||
|
||||
if ((event.ctrlKey === true || event.metaKey === true) && event.altKey === true) { // Dev Tool
|
||||
if (nodeOnFocus !== undefined) {
|
||||
console.log(nodeOnFocus)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if (event.altKey === true && event.code === 'ArrowUp') {
|
||||
thisObject.cockpitSpace.toTop()
|
||||
return
|
||||
|
||||
@@ -40,6 +40,10 @@ function newReferenceAttachDetach () {
|
||||
completeDetachment(node)
|
||||
return
|
||||
}
|
||||
case 'Process Instance': {
|
||||
completeDetachment(node)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +81,10 @@ function newReferenceAttachDetach () {
|
||||
completeAttachment(node, attachToNode)
|
||||
}
|
||||
break
|
||||
case 'Process Instance': {
|
||||
completeAttachment(node, attachToNode)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -560,6 +560,15 @@ function newUiObjectsFromNodes () {
|
||||
return
|
||||
}
|
||||
case 'Process Instance': {
|
||||
let referenceParent
|
||||
if (mapOfReferenceChildren !== undefined) {
|
||||
if (node.savedPayload.referenceParent !== undefined) {
|
||||
if (node.savedPayload.referenceParent.id !== undefined) {
|
||||
mapOfReferenceChildren.set(node.id, node)
|
||||
referenceParent = node.savedPayload.referenceParent
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parentNode !== undefined) {
|
||||
switch (parentNode.type) {
|
||||
case 'Sensor Bot Instance': {
|
||||
@@ -580,6 +589,11 @@ function newUiObjectsFromNodes () {
|
||||
if (node.session !== undefined) {
|
||||
createUiObjectFromNode(node.session, node, node)
|
||||
}
|
||||
if (referenceParent !== undefined) {
|
||||
node.savedPayload = {
|
||||
referenceParent: referenceParent
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
case 'Backtesting Session': {
|
||||
@@ -748,6 +762,14 @@ function newUiObjectsFromNodes () {
|
||||
return
|
||||
}
|
||||
case 'Process Definition': {
|
||||
let referenceChildren
|
||||
if (mapOfReferenceParents !== undefined) {
|
||||
if (node.savedPayload.referenceChildren !== undefined) {
|
||||
referenceChildren = []
|
||||
mapOfReferenceParents.set(node.id, node)
|
||||
referenceChildren = node.savedPayload.referenceChildren
|
||||
}
|
||||
}
|
||||
createUiObject(node.type, node.name, node, parentNode, chainParent, node.type)
|
||||
if (node.statusReport !== undefined) {
|
||||
createUiObjectFromNode(node.statusReport, node, node)
|
||||
@@ -776,6 +798,11 @@ function newUiObjectsFromNodes () {
|
||||
let dataDependency = node.dataDependencies[m]
|
||||
createUiObjectFromNode(dataDependency, node, node)
|
||||
}
|
||||
if (referenceChildren !== undefined) {
|
||||
node.savedPayload = {
|
||||
referenceChildren: referenceChildren
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
case 'Status Report': {
|
||||
@@ -1063,7 +1090,8 @@ function newUiObjectsFromNodes () {
|
||||
code: '{}',
|
||||
outputDatasets: [],
|
||||
statusDependencies: [],
|
||||
dataDependencies: []
|
||||
dataDependencies: [],
|
||||
referenceChildren: []
|
||||
}
|
||||
if (node.processes === undefined) {
|
||||
node.processes = []
|
||||
|
||||
@@ -699,6 +699,10 @@ function newUiObject () {
|
||||
compatibleType = '->' + 'Execution Finished Event' + '->'
|
||||
compatibleSubType = undefined
|
||||
break
|
||||
case 'Process Instance':
|
||||
compatibleType = '->' + 'Process Definition' + '->'
|
||||
compatibleSubType = undefined
|
||||
break
|
||||
default:
|
||||
return
|
||||
}
|
||||
@@ -1047,7 +1051,16 @@ function newUiObject () {
|
||||
browserCanvasContext.moveTo(position.x, position.y)
|
||||
browserCanvasContext.lineTo(targetPoint.x, targetPoint.y)
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + LINE_STYLE + ', 1)'
|
||||
browserCanvasContext.setLineDash([3, 4])
|
||||
browserCanvasContext.setLineDash([3, 47])
|
||||
browserCanvasContext.lineWidth = 4
|
||||
browserCanvasContext.stroke()
|
||||
browserCanvasContext.setLineDash([0, 0])
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
browserCanvasContext.moveTo(position.x, position.y)
|
||||
browserCanvasContext.lineTo(targetPoint.x, targetPoint.y)
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + LINE_STYLE + ', 1)'
|
||||
browserCanvasContext.setLineDash([1, 9])
|
||||
browserCanvasContext.lineWidth = 2
|
||||
browserCanvasContext.stroke()
|
||||
browserCanvasContext.setLineDash([0, 0])
|
||||
@@ -1082,17 +1095,26 @@ function newUiObject () {
|
||||
targetPoint = canvas.floatingSpace.container.frame.frameThisPoint(targetPoint)
|
||||
position = thisObject.container.frame.frameThisPoint(position)
|
||||
|
||||
let LINE_STYLE = UI_COLOR.GREY
|
||||
|
||||
if (thisObject.container.frame.radius > 1) {
|
||||
/* Target Line */
|
||||
|
||||
let LINE_STYLE = UI_COLOR.GREY
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
browserCanvasContext.moveTo(position.x, position.y)
|
||||
browserCanvasContext.lineTo(targetPoint.x, targetPoint.y)
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + LINE_STYLE + ', 1)'
|
||||
browserCanvasContext.setLineDash([2, 20])
|
||||
browserCanvasContext.lineWidth = 2
|
||||
browserCanvasContext.setLineDash([1, 9])
|
||||
browserCanvasContext.lineWidth = 1
|
||||
browserCanvasContext.stroke()
|
||||
browserCanvasContext.setLineDash([0, 0])
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
browserCanvasContext.moveTo(position.x, position.y)
|
||||
browserCanvasContext.lineTo(targetPoint.x, targetPoint.y)
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + LINE_STYLE + ', 1)'
|
||||
browserCanvasContext.setLineDash([1, 9, 2, 8, 3, 7, 4, 6, 5, 5, 0, 100])
|
||||
browserCanvasContext.lineWidth = 4
|
||||
browserCanvasContext.stroke()
|
||||
browserCanvasContext.setLineDash([0, 0])
|
||||
}
|
||||
@@ -1108,6 +1130,18 @@ function newUiObject () {
|
||||
browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', 1)'
|
||||
browserCanvasContext.fill()
|
||||
}
|
||||
/*
|
||||
let VISIBLE_RADIUS = thisObject.container.frame.radius * 1
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
browserCanvasContext.arc(position.x, position.y, VISIBLE_RADIUS, 0, Math.PI * 2, true)
|
||||
browserCanvasContext.closePath()
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + LINE_STYLE + ', 1)'
|
||||
browserCanvasContext.lineWidth = 2
|
||||
browserCanvasContext.setLineDash([2, 20])
|
||||
browserCanvasContext.stroke()
|
||||
browserCanvasContext.setLineDash([0, 0])
|
||||
*/
|
||||
}
|
||||
|
||||
function drawText () {
|
||||
@@ -1477,3 +1511,4 @@ function newUiObject () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user