Pinning implementation complete
This commit is contained in:
1 parent
21c22bf4a5
commit
c5e6d55fc0
4 files changed
+172
-32
No files matched your search
@@ -55,19 +55,22 @@ function newStrategyPartConstructor () {
|
||||
let menuItemsInitialValues = []
|
||||
switch (payload.node.type) {
|
||||
case 'Trading System': {
|
||||
floatingObject.isPinned = true
|
||||
floatingObject.positionLocked = true
|
||||
strategyPart.imagePath = 'Images/icons/style-01/analysis.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: true,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -120
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Reload Trading System',
|
||||
@@ -75,7 +78,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'Reload',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/vector.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/vector.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -90,7 +93,7 @@ function newStrategyPartConstructor () {
|
||||
workFailedLabel: 'Not Saved',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/upload.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/upload.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -102,7 +105,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'New Strategy',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/quality.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/quality.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -114,7 +117,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'Settings',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/tools.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/tools.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -125,13 +128,26 @@ function newStrategyPartConstructor () {
|
||||
case 'Strategy': {
|
||||
strategyPart.imagePath = 'Images/icons/style-01/quality.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Delete Strategy',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Delete This Strategy',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/trash.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -143,7 +159,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'Settings',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/tools.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/tools.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -154,13 +170,26 @@ function newStrategyPartConstructor () {
|
||||
case 'Strategy Entry Event': {
|
||||
strategyPart.imagePath = 'Images/icons/style-01/startup.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Add Situation',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/attractive.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -171,13 +200,26 @@ function newStrategyPartConstructor () {
|
||||
case 'Strategy Exit Event': {
|
||||
strategyPart.imagePath = 'Images/icons/style-01/support.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Add Situation',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/attractive.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -188,13 +230,26 @@ function newStrategyPartConstructor () {
|
||||
case 'Trade Entry Event': {
|
||||
strategyPart.imagePath = 'Images/icons/style-01/compass.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Add Situation',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/attractive.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -205,13 +260,26 @@ function newStrategyPartConstructor () {
|
||||
case 'Stop': {
|
||||
strategyPart.imagePath = 'Images/icons/style-01/pixel.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Add Phase',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/placeholder.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/placeholder.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -222,13 +290,26 @@ function newStrategyPartConstructor () {
|
||||
case 'Take Profit': {
|
||||
strategyPart.imagePath = 'Images/icons/style-01/competition.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Add Phase',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/placeholder.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/placeholder.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -244,13 +325,26 @@ function newStrategyPartConstructor () {
|
||||
strategyPart.codeEditor.container.connectToParent(strategyPart.container, false, false, true, true, false, false, false, false)
|
||||
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Edit Code',
|
||||
actionFunction: strategyPart.codeEditor.activate,
|
||||
label: 'Edit Code',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/html.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/html.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -262,7 +356,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/attractive.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -274,7 +368,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'Delete This Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/trash.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -285,13 +379,26 @@ function newStrategyPartConstructor () {
|
||||
case 'Situation': {
|
||||
strategyPart.imagePath = 'Images/icons/style-01/attractive.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Add Condition',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Condition',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/testing.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/testing.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -303,7 +410,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'Delete This Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/trash.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -319,13 +426,26 @@ function newStrategyPartConstructor () {
|
||||
strategyPart.codeEditor.container.connectToParent(strategyPart.container, false, false, true, true, false, false, false, false)
|
||||
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Pin / Unpin',
|
||||
actionFunction: floatingObject.pinToggle,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/security.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Edit Code',
|
||||
actionFunction: strategyPart.codeEditor.activate,
|
||||
label: 'Edit Code',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/html.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/html.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -337,7 +457,7 @@ function newStrategyPartConstructor () {
|
||||
label: 'Delete This Condition',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
imagePathOff: 'Images/icons/style-01/trash.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
|
||||
Reference in new issue
Block a user