Bug Fixed when loading from file

This commit is contained in:
Luis Fernando Molina committed 2019-05-23 21:02:30 +02:00
1 parent fe6750a9b9
commit d9d8b512e5
2 files changed
+5 -2

No files matched your search

+2
View File
@@ -110,6 +110,7 @@ function newStrategyPartTitle () {
}
function physics () {
if (thisObject.payload.title === undefined) { return }
let title = trimTitle(thisObject.payload.title)
const FRAME_HEIGHT = 25
@@ -252,6 +253,7 @@ function newStrategyPartTitle () {
}
function trimTitle (title) {
if (title === undefined) { return }
const MAX_LABEL_LENGTH = 35
if (title.length > MAX_LABEL_LENGTH) {
title = title.substring(0, MAX_LABEL_LENGTH) + '...'
+3 -2
View File
@@ -78,12 +78,12 @@ function newWorkspace () {
return
}
case 'Stop': {
let lastPhase
let stop = node
createPart('Stop', stop.name, stop, parentNode, chainParent, 'Stop')
for (let m = 0; m < node.phases.length; m++) {
let phase = node.phases[m]
let thisChainParent
let lastPhase
if (m === 0) {
thisChainParent = node
} else {
@@ -95,12 +95,12 @@ function newWorkspace () {
return
}
case 'Take Profit': {
let lastPhase
let takeProfit = node
createPart('Take Profit', takeProfit.name, takeProfit, parentNode, chainParent, 'Take Profit')
for (let m = 0; m < node.phases.length; m++) {
let phase = node.phases[m]
let thisChainParent
let lastPhase
if (m === 0) {
thisChainParent = node
} else {
@@ -864,3 +864,4 @@ function newWorkspace () {
}
}
}