action added
This commit is contained in:
1 parent
7de9979f56
commit
cf30ff38a2
4 files changed
+49
-18
No files matched your search
@@ -34,6 +34,7 @@ function newCircularMenu () {
|
||||
let menuItem = newCircularMenuItem()
|
||||
let menuItemInitialValue = menuItemsInitialValues[i]
|
||||
|
||||
menuItem.action = menuItemInitialValue.action
|
||||
menuItem.label = menuItemInitialValue.label
|
||||
menuItem.visible = menuItemInitialValue.visible
|
||||
menuItem.imagePathOn = menuItemInitialValue.imagePathOn
|
||||
|
||||
@@ -6,6 +6,7 @@ function newCircularMenuItem () {
|
||||
isDeployed: undefined,
|
||||
iconOn: undefined,
|
||||
iconOff: undefined,
|
||||
action: undefined,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: undefined,
|
||||
@@ -99,7 +100,7 @@ function newCircularMenuItem () {
|
||||
}
|
||||
|
||||
function onMouseClick (event) {
|
||||
payload.onMenuItemClick(payload)
|
||||
payload.onMenuItemClick(payload, action)
|
||||
}
|
||||
|
||||
function drawBackground () {
|
||||
|
||||
@@ -39,6 +39,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/quality.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Open Settings',
|
||||
label: 'Settings',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/tools.png',
|
||||
@@ -49,6 +50,7 @@ function newStrategyPart () {
|
||||
angle: 20
|
||||
},
|
||||
{
|
||||
action: 'Delete Strategy',
|
||||
label: 'Delete This Strategy',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
@@ -64,6 +66,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/startup.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Add Situation',
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
@@ -79,6 +82,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/support.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Add Situation',
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
@@ -94,21 +98,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/compass.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 0
|
||||
}]
|
||||
break
|
||||
}
|
||||
case 'Trade Exit': {
|
||||
imagePath = 'Images/icons/style-01/broken-link.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Add Situation',
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
@@ -124,6 +114,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/pixel.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Add Phase',
|
||||
label: 'Add Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/placeholder.png',
|
||||
@@ -139,6 +130,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/competition.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Add Phase',
|
||||
label: 'Add Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/placeholder.png',
|
||||
@@ -154,6 +146,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/placeholder.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Edit Code',
|
||||
label: 'Edit Code',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/html.png',
|
||||
@@ -164,6 +157,7 @@ function newStrategyPart () {
|
||||
angle: 40
|
||||
},
|
||||
{
|
||||
action: 'Add Situation',
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/attractive.png',
|
||||
@@ -174,6 +168,7 @@ function newStrategyPart () {
|
||||
angle: 0
|
||||
},
|
||||
{
|
||||
action: 'Delete Phase',
|
||||
label: 'Delete This Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
@@ -189,6 +184,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/attractive.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Add Condition',
|
||||
label: 'Add Condition',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/testing.png',
|
||||
@@ -199,6 +195,7 @@ function newStrategyPart () {
|
||||
angle: 20
|
||||
},
|
||||
{
|
||||
action: 'Delete Situation',
|
||||
label: 'Delete This Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
@@ -214,6 +211,7 @@ function newStrategyPart () {
|
||||
imagePath = 'Images/icons/style-01/testing.png'
|
||||
menuItemsInitialValues = [
|
||||
{
|
||||
action: 'Edit Code',
|
||||
label: 'Edit Code',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/html.png',
|
||||
@@ -224,6 +222,7 @@ function newStrategyPart () {
|
||||
angle: 20
|
||||
},
|
||||
{
|
||||
action: 'Delete Condition',
|
||||
label: 'Delete This Condition',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
|
||||
@@ -50,8 +50,38 @@ function newStrategyCollectionItem () {
|
||||
}
|
||||
}
|
||||
|
||||
function onMenuItemClick (payload) {
|
||||
console.log('onMenuItemClick')
|
||||
function onMenuItemClick (payload, action) {
|
||||
console.log('onMenuItemClick ' + action)
|
||||
|
||||
switch (action) {
|
||||
case 'Open Settings':
|
||||
|
||||
break
|
||||
case 'Delete Strategy':
|
||||
|
||||
break
|
||||
case 'Add Situation':
|
||||
|
||||
break
|
||||
case 'Add Phase':
|
||||
|
||||
break
|
||||
case 'Edit Code':
|
||||
|
||||
break
|
||||
case 'Delete Phase':
|
||||
|
||||
break
|
||||
case 'Delete Situation':
|
||||
|
||||
break
|
||||
case 'Delete Condition':
|
||||
|
||||
break
|
||||
default:
|
||||
|
||||
}
|
||||
|
||||
payload.profile.upLabel = payload.profile.upLabel + '1'
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user