Trading System Title always visible
This commit is contained in:
1 parent
684b00b132
commit
b40019068e
3 files changed
+6
-3
No files matched your search
@@ -482,7 +482,7 @@ function newStrategyPart () {
|
||||
|
||||
labelPoint = {
|
||||
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5,
|
||||
y: position.y + radius * 2 / 3 + fontSize * FONT_ASPECT_RATIO + 15
|
||||
y: position.y + radius * 4 / 5 + fontSize * FONT_ASPECT_RATIO + 15
|
||||
}
|
||||
|
||||
browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY
|
||||
@@ -674,3 +674,4 @@ function newStrategyPart () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ function newStrategyPartTitle () {
|
||||
|
||||
switch (payload.node.type) {
|
||||
case 'Trading System': {
|
||||
thisObject.allwaysVisible = true
|
||||
break
|
||||
}
|
||||
case 'Strategy': {
|
||||
@@ -116,7 +117,7 @@ function newStrategyPartTitle () {
|
||||
const FRAME_HEIGHT = 25
|
||||
const FRAME_WIDTH = title.length / 2 * thisObject.payload.floatingObject.currentFontSize * FONT_ASPECT_RATIO * 1.2 * 2
|
||||
thisObject.container.frame.position.x = 0 - FRAME_WIDTH / 2
|
||||
thisObject.container.frame.position.y = 0 - thisObject.container.frame.radius * 1 / 2 - thisObject.payload.floatingObject.currentFontSize * FONT_ASPECT_RATIO - 10 - FRAME_HEIGHT
|
||||
thisObject.container.frame.position.y = 0 - thisObject.container.frame.radius * 1 / 2 - thisObject.payload.floatingObject.currentFontSize * FONT_ASPECT_RATIO - 20 - FRAME_HEIGHT
|
||||
|
||||
thisObject.container.frame.width = FRAME_WIDTH
|
||||
thisObject.container.frame.height = FRAME_HEIGHT
|
||||
|
||||
@@ -391,6 +391,7 @@ function newWorkspace () {
|
||||
function createPart (partType, name, node, parentNode, chainParent, title) {
|
||||
let payload = {}
|
||||
|
||||
if (name === '' || name === undefined) { name = 'My ' + partType }
|
||||
if (node.savedPayload !== undefined) {
|
||||
payload.targetPosition = {
|
||||
x: node.savedPayload.targetPosition.x,
|
||||
@@ -440,7 +441,7 @@ function newWorkspace () {
|
||||
let lastPhase
|
||||
let tradingSystem = node
|
||||
|
||||
createPart('Trading System', '', tradingSystem, undefined, undefined)
|
||||
createPart('Trading System', tradingSystem.name, tradingSystem, undefined, undefined)
|
||||
|
||||
for (m = 0; m < tradingSystem.strategies.length; m++) {
|
||||
let strategy = tradingSystem.strategies[m]
|
||||
|
||||
Reference in new issue
Block a user