Concept of default definition eliminated
This commit is contained in:
1 parent
2228201613
commit
744b72e9eb
5 files changed
+4
-35
No files matched your search
@@ -18,12 +18,9 @@ function newStrategyPart () {
|
||||
partTitle: undefined,
|
||||
circularProgressBar: undefined,
|
||||
isExecuting: undefined,
|
||||
isDefault: undefined,
|
||||
isRunning: undefined,
|
||||
run: run,
|
||||
stop: stop,
|
||||
setDefaultStatus: setDefaultStatus,
|
||||
setNotRunningStatus: setNotRunningStatus,
|
||||
getReadyToAttach: getReadyToAttach,
|
||||
showAvailabilityToAttach: showAvailabilityToAttach,
|
||||
highlight: highlight,
|
||||
@@ -64,7 +61,6 @@ function newStrategyPart () {
|
||||
|
||||
let hasValue
|
||||
let valueCounter = 0
|
||||
let runningCounter = 0
|
||||
|
||||
let previousDistance
|
||||
|
||||
@@ -640,22 +636,6 @@ function newStrategyPart () {
|
||||
}
|
||||
}
|
||||
|
||||
function setAsDefault () {
|
||||
setDefaultStatus()
|
||||
canvas.cockpitSpace.restartSimulation.restart()
|
||||
}
|
||||
|
||||
function setDefaultStatus () {
|
||||
canvas.strategySpace.workspace.definition = thisObject.payload.node
|
||||
thisObject.isDefault = true
|
||||
runningCounter = 30
|
||||
}
|
||||
|
||||
function setNotRunningStatus () {
|
||||
canvas.strategySpace.workspace.definition = undefined
|
||||
thisObject.isDefault = false
|
||||
}
|
||||
|
||||
function iconPhysics () {
|
||||
icon = canvas.strategySpace.iconByPartType.get(thisObject.payload.node.type)
|
||||
executingIcon = canvas.strategySpace.iconCollection.get('attractive')
|
||||
@@ -1033,9 +1013,9 @@ function newStrategyPart () {
|
||||
|
||||
browserCanvasContext.fill()
|
||||
|
||||
if (thisObject.isDefault === true) {
|
||||
if (thisObject.payload.node.type === 'Definition') {
|
||||
VISIBLE_RADIUS = thisObject.container.frame.radius * 2
|
||||
let OPACITY = runningCounter / 30
|
||||
let OPACITY = 1
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
browserCanvasContext.arc(visiblePosition.x, visiblePosition.y, VISIBLE_RADIUS, 0, Math.PI * 2, true)
|
||||
|
||||
@@ -67,13 +67,6 @@ function newStrategyPartConstructor () {
|
||||
strategyPart.initialize(payload, menuItemsInitialValues)
|
||||
strategyPart.container.connectToParent(floatingObject.container, false, false, true, true, false, false, true, true, true, true, true)
|
||||
|
||||
if (payload.node.savedPayload !== undefined) {
|
||||
if (payload.node.savedPayload.uiObject.isDefault === true) {
|
||||
strategyPart.setDefaultStatus()
|
||||
canvas.strategySpace.workspace.definition = payload.node
|
||||
}
|
||||
}
|
||||
|
||||
setFloatingObjectBasicProperties(floatingObject, payload)
|
||||
|
||||
payload.node.savedPayload = undefined
|
||||
|
||||
@@ -260,10 +260,6 @@ function newNodeDeleter () {
|
||||
if (counter <= 1) { return }
|
||||
}
|
||||
|
||||
if (node.payload.uiObject.isDefault === true) {
|
||||
node.payload.uiObject.setNotRunningStatus()
|
||||
}
|
||||
|
||||
if (node.tradingSystem !== undefined) {
|
||||
deleteTradingSystem(node.tradingSystem, rootNodes)
|
||||
}
|
||||
|
||||
@@ -643,7 +643,7 @@ function newStringifyNode () {
|
||||
isTensed: (node.payload.floatingObject.isTensed && node.payload.floatingObject.tensedManually)
|
||||
},
|
||||
uiObject: {
|
||||
isDefault: node.payload.uiObject.isDefault
|
||||
isRunning: node.payload.uiObject.isRunning
|
||||
}
|
||||
}
|
||||
return savedPayload
|
||||
|
||||
@@ -97,7 +97,7 @@ function newWorkspace () {
|
||||
thisObject.definition = canvas.strategySpace.strategizerGateway.strategizerData
|
||||
thisObject.workspaceNode.rootNodes.push(thisObject.definition)
|
||||
functionLibraryPartsFromNodes.createPartFromNode(thisObject.definition, undefined, undefined)
|
||||
thisObject.definition.payload.uiObject.setDefaultStatus()
|
||||
|
||||
thisObject.enabled = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user