Includes Improved

This commit is contained in:
Luis Fernando Molina committed 2020-03-30 09:07:52 +02:00
1 parent 248418ceec
commit 709353da7c
3 files changed
+12 -36

No files matched your search

@@ -55,6 +55,7 @@ function newUiObjectsFromNodes () {
}
}
}
receivedNode.isIncluded = true
node.rootNodes.push(receivedNode)
totalIncluded++
if (totalIncluded === includeDataMines.length + includeTradingSystems.length + includeSuperScripts.length) {
@@ -83,6 +84,7 @@ function newUiObjectsFromNodes () {
}
}
}
receivedNode.isIncluded = true
node.rootNodes.push(receivedNode)
totalIncluded++
if (totalIncluded === includeDataMines.length + includeTradingSystems.length + includeSuperScripts.length) {
@@ -111,6 +113,7 @@ function newUiObjectsFromNodes () {
}
}
}
receivedNode.isIncluded = true
node.rootNodes.push(receivedNode)
totalIncluded++
if (totalIncluded === includeDataMines.length + includeTradingSystems.length + includeSuperScripts.length) {
+4 -35
View File
@@ -169,44 +169,13 @@ function newWorkspace () {
}
function stringifyWorkspace (removePersonalData) {
let code
if (thisObject.workspaceNode.code === undefined) {
thisObject.workspaceNode.code = '{ \n"includeDataMines": ["Masters", "Sparta", "TradingEngines"],\n"includeTradingSystems": ["WHB-BTC-USDT", "WHB-ETH-USDT", "BRR-BTC-USDT"],\n"includeSuperScripts": ["Superalgos"]\n }'
}
code = JSON.parse(thisObject.workspaceNode.code)
let includeDataMines = code.includeDataMines
let includeTradingSystems = code.includeTradingSystems
let includeSuperScripts = code.includeSuperScripts
let stringifyReadyNodes = []
for (let i = 0; i < thisObject.workspaceNode.rootNodes.length; i++) {
let rootNode = thisObject.workspaceNode.rootNodes[i]
let node = functionLibraryProtocolNode.getProtocolNode(rootNode, removePersonalData, false, true, true, true)
if (node) {
switch (node.type) {
case 'Data Mine': {
code = JSON.parse(node.code)
if (includeDataMines.includes(code.codeName) === false) {
stringifyReadyNodes.push(node)
}
break
}
case 'Trading System': {
code = JSON.parse(node.code)
if (includeTradingSystems.includes(code.codeName) === false) {
stringifyReadyNodes.push(node)
}
break
}
case 'Super Scripts': {
code = JSON.parse(node.code)
if (includeSuperScripts.includes(code.codeName) === false) {
stringifyReadyNodes.push(node)
}
break
}
default: stringifyReadyNodes.push(node)
}
if (rootNode.isIncluded !== true) {
let node = functionLibraryProtocolNode.getProtocolNode(rootNode, removePersonalData, false, true, true, true)
stringifyReadyNodes.push(node)
}
}
let workspace = {
+5 -1
View File
@@ -1537,7 +1537,11 @@ function newUiObject () {
browserCanvasContext.closePath()
browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.LIGHT_GREY + ', ' + OPACITY + ')'
browserCanvasContext.lineWidth = 1
browserCanvasContext.setLineDash([20, 20])
if (thisObject.payload.node.isIncluded === true) {
browserCanvasContext.setLineDash([0, 0])
} else {
browserCanvasContext.setLineDash([20, 20])
}
browserCanvasContext.stroke()
}
}