Refactoring to Trading System
This commit is contained in:
1 parent
a4f199f792
commit
2fcd49ff13
8 files changed
+31
-32
No files matched your search
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
function onMouseClick (event) {
|
||||
// canvas.strategySpace.investmentPlanWorkspace.showUp()
|
||||
// canvas.strategySpace.tradingSystemWorkspace.showUp()
|
||||
}
|
||||
|
||||
function resize () {
|
||||
|
||||
@@ -3,7 +3,7 @@ function newStrategySpace () {
|
||||
const MODULE_NAME = 'Strategy Space'
|
||||
let thisObject = {
|
||||
sidePanel: undefined,
|
||||
investmentPlanWorkspace: undefined,
|
||||
tradingSystemWorkspace: undefined,
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer,
|
||||
@@ -24,16 +24,16 @@ function newStrategySpace () {
|
||||
// thisObject.sidePanel = newSidePanel()
|
||||
// thisObject.sidePanel.initialize()
|
||||
|
||||
thisObject.investmentPlanWorkspace = newInvestmentPlanWorkspace()
|
||||
// thisObject.investmentPlanWorkspace.container.connectToParent(thisObject.sidePanel.container, true, true)
|
||||
await thisObject.investmentPlanWorkspace.initialize()
|
||||
thisObject.tradingSystemWorkspace = newTradingSystemWorkspace()
|
||||
// thisObject.tradingSystemWorkspace.container.connectToParent(thisObject.sidePanel.container, true, true)
|
||||
await thisObject.tradingSystemWorkspace.initialize()
|
||||
|
||||
// thisObject.sidePanel.areas.push(thisObject.investmentPlanWorkspace)
|
||||
// thisObject.sidePanel.areas.push(thisObject.tradingSystemWorkspace)
|
||||
}
|
||||
|
||||
function makeVisible () {
|
||||
if (thisObject.investmentPlanWorkspace.isDeployed !== true) {
|
||||
thisObject.investmentPlanWorkspace.deploydInvestmentPlan()
|
||||
if (thisObject.tradingSystemWorkspace.isDeployed !== true) {
|
||||
thisObject.tradingSystemWorkspace.deploydTradingSystem()
|
||||
}
|
||||
canvas.floatingSpace.makeVisible()
|
||||
visible = true
|
||||
@@ -46,8 +46,8 @@ function newStrategySpace () {
|
||||
function getContainer (point) {
|
||||
let container
|
||||
|
||||
if (thisObject.investmentPlanWorkspace !== undefined) {
|
||||
container = thisObject.investmentPlanWorkspace.getContainer(point)
|
||||
if (thisObject.tradingSystemWorkspace !== undefined) {
|
||||
container = thisObject.tradingSystemWorkspace.getContainer(point)
|
||||
if (container !== undefined) { return container }
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user