part to uiObject refactoring
This commit is contained in:
1 parent
e73f6d74f1
commit
aaa732e4fe
2 files changed
+9
-9
No files matched your search
+6
-6
@@ -505,7 +505,7 @@
|
||||
formulaValues: conditionRecord.formulaValues
|
||||
};
|
||||
|
||||
sendRecordInfoToStrategySpace(currentRecord)
|
||||
sendRecordInfoToDesignerSpace(currentRecord)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,18 +515,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
function sendRecordInfoToStrategySpace(currentRecord) {
|
||||
function sendRecordInfoToDesignerSpace(currentRecord) {
|
||||
|
||||
if (currentRecord === undefined) { return; }
|
||||
if (currentRecord.conditionsNames === undefined) { return; }
|
||||
if (canvas.strategySpace.workspace === undefined) { return; }
|
||||
if (canvas.designerSpace.workspace === undefined) { return; }
|
||||
|
||||
/* We will get now the designer trading system */
|
||||
let designerTradingSystem
|
||||
let fileTradingSystem = currentRecord.conditionsNames;
|
||||
|
||||
for (let i = 0; i < canvas.strategySpace.workspace.workspaceNode.rootNodes.length; i++) {
|
||||
let rootNode = canvas.strategySpace.workspace.workspaceNode.rootNodes[i]
|
||||
for (let i = 0; i < canvas.designerSpace.workspace.workspaceNode.rootNodes.length; i++) {
|
||||
let rootNode = canvas.designerSpace.workspace.workspaceNode.rootNodes[i]
|
||||
if (rootNode.type === 'Definition') {
|
||||
if (rootNode.tradingSystem.id === fileTradingSystem.id) {
|
||||
designerTradingSystem = rootNode.tradingSystem
|
||||
@@ -960,7 +960,7 @@
|
||||
browserCanvasContext.fill();
|
||||
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] sendRecordInfoToStrategySpace -> err = " + err.stack); }
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] sendRecordInfoToDesignerSpace -> err = " + err.stack); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,9 +141,9 @@
|
||||
|
||||
/* Loading a few icons */
|
||||
|
||||
imageStopLossPhase = canvas.strategySpace.iconByPartType.get('Stop');
|
||||
imageTakeProfitPhase = canvas.strategySpace.iconByPartType.get('Phase');
|
||||
imageRecord = canvas.strategySpace.iconByPartType.get('Trading System');
|
||||
imageStopLossPhase = canvas.designerSpace.iconByUiObjectType.get('Stop');
|
||||
imageTakeProfitPhase = canvas.designerSpace.iconByUiObjectType.get('Phase');
|
||||
imageRecord = canvas.designerSpace.iconByUiObjectType.get('Trading System');
|
||||
|
||||
callBackFunction();
|
||||
|
||||
|
||||
Reference in new issue
Block a user