Refactoring for icon
This commit is contained in:
1 parent
a01b7f645d
commit
6db14dfa1f
4 files changed
+73
-73
No files matched your search
@@ -57,8 +57,8 @@ function newCircularMenu () {
|
||||
menuItem.workDoneLabel = menuItemInitialValue.workDoneLabel
|
||||
menuItem.workFailedLabel = menuItemInitialValue.workFailedLabel
|
||||
menuItem.visible = menuItemInitialValue.visible
|
||||
menuItem.imagePathOn = menuItemInitialValue.imagePathOn
|
||||
menuItem.imagePathOff = menuItemInitialValue.imagePathOff
|
||||
menuItem.iconPathOn = menuItemInitialValue.iconPathOn
|
||||
menuItem.iconPathOff = menuItemInitialValue.iconPathOff
|
||||
menuItem.rawRadius = menuItemInitialValue.rawRadius
|
||||
menuItem.targetRadius = menuItemInitialValue.label
|
||||
menuItem.currentRadius = menuItemInitialValue.currentRadius
|
||||
|
||||
@@ -15,8 +15,8 @@ function newCircularMenuItem () {
|
||||
workDoneLabel: undefined,
|
||||
workFailedLabel: undefined,
|
||||
visible: false,
|
||||
imagePathOn: undefined,
|
||||
imagePathOff: undefined,
|
||||
iconPathOn: undefined,
|
||||
iconPathOff: undefined,
|
||||
rawRadius: undefined,
|
||||
targetRadius: undefined,
|
||||
currentRadius: undefined,
|
||||
@@ -74,8 +74,8 @@ function newCircularMenuItem () {
|
||||
thisObject.payload = pPayload
|
||||
/* Load Menu Images */
|
||||
|
||||
thisObject.iconOn = canvas.strategySpace.iconCollection.get(thisObject.imagePathOn)
|
||||
thisObject.iconOff = canvas.strategySpace.iconCollection.get(thisObject.imagePathOff)
|
||||
thisObject.iconOn = canvas.strategySpace.iconCollection.get(thisObject.iconPathOn)
|
||||
thisObject.iconOff = canvas.strategySpace.iconCollection.get(thisObject.iconPathOff)
|
||||
|
||||
if (thisObject.currentStatus === true) {
|
||||
thisObject.icon = thisObject.iconOn
|
||||
@@ -217,7 +217,7 @@ function newCircularMenuItem () {
|
||||
iconSize = thisObject.currentRadius
|
||||
}
|
||||
|
||||
if (thisObject.canDrawIcon === true && thisObject.currentRadius > 1 && thisObject.isDeployed === true) {
|
||||
if (thisObject.icon.canDrawIcon === true && thisObject.currentRadius > 1 && thisObject.isDeployed === true) {
|
||||
browserCanvasContext.drawImage(thisObject.icon, menuPosition.x - iconSize, menuPosition.y - iconSize, iconSize * 2, iconSize * 2)
|
||||
|
||||
/* Menu Label */
|
||||
|
||||
@@ -24,8 +24,8 @@ function newProfileBall () {
|
||||
let ballStringMenu = [
|
||||
{
|
||||
visible: false,
|
||||
imagePathOn: 'Images/menu.icon.on.1.gif',
|
||||
imagePathOff: 'Images/menu.icon.off.1.gif',
|
||||
iconPathOn: 'Images/menu.icon.on.1.gif',
|
||||
iconPathOff: 'Images/menu.icon.off.1.gif',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -33,8 +33,8 @@ function newProfileBall () {
|
||||
}/*,
|
||||
{
|
||||
visible: false,
|
||||
imagePathOn: "Images/menu.icon.on.2.gif",
|
||||
imagePathOff: "Images/menu.icon.off.2.gif",
|
||||
iconPathOn: "Images/menu.icon.on.2.gif",
|
||||
iconPathOff: "Images/menu.icon.off.2.gif",
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -42,8 +42,8 @@ function newProfileBall () {
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
imagePathOn: "Images/menu.icon.on.3.gif",
|
||||
imagePathOff: "Images/menu.icon.off.3.gif",
|
||||
iconPathOn: "Images/menu.icon.on.3.gif",
|
||||
iconPathOff: "Images/menu.icon.off.3.gif",
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -51,8 +51,8 @@ function newProfileBall () {
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
imagePathOn: "Images/menu.icon.on.4.gif",
|
||||
imagePathOff: "Images/menu.icon.off.4.gif",
|
||||
iconPathOn: "Images/menu.icon.on.4.gif",
|
||||
iconPathOff: "Images/menu.icon.off.4.gif",
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -73,9 +73,9 @@ function newProfileBall () {
|
||||
function onImageLoad () {
|
||||
menuItem.canDrawIcon = true
|
||||
}
|
||||
menuItem.iconOff.src = window.canvasApp.urlPrefix + menuItem.imagePathOff
|
||||
menuItem.iconOff.src = window.canvasApp.urlPrefix + menuItem.iconPathOff
|
||||
}
|
||||
menuItem.iconOn.src = window.canvasApp.urlPrefix + menuItem.imagePathOn
|
||||
menuItem.iconOn.src = window.canvasApp.urlPrefix + menuItem.iconPathOn
|
||||
menuItem.icon = menuItem.iconOn // The default value is ON.
|
||||
}
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: true,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -76,8 +76,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Reload',
|
||||
visible: false,
|
||||
imagePathOn: 'vector',
|
||||
imagePathOff: 'vector',
|
||||
iconPathOn: 'vector',
|
||||
iconPathOff: 'vector',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -91,8 +91,8 @@ function newStrategyPartConstructor () {
|
||||
workDoneLabel: 'Saved',
|
||||
workFailedLabel: 'Not Saved',
|
||||
visible: false,
|
||||
imagePathOn: 'upload',
|
||||
imagePathOff: 'upload',
|
||||
iconPathOn: 'upload',
|
||||
iconPathOff: 'upload',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -103,8 +103,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'New Strategy',
|
||||
visible: false,
|
||||
imagePathOn: 'quality',
|
||||
imagePathOff: 'quality',
|
||||
iconPathOn: 'quality',
|
||||
iconPathOff: 'quality',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -115,8 +115,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Settings',
|
||||
visible: false,
|
||||
imagePathOn: 'tools',
|
||||
imagePathOff: 'tools',
|
||||
iconPathOn: 'tools',
|
||||
iconPathOff: 'tools',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -132,8 +132,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -144,8 +144,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Delete This Strategy',
|
||||
visible: false,
|
||||
imagePathOn: 'trash',
|
||||
imagePathOff: 'trash',
|
||||
iconPathOn: 'trash',
|
||||
iconPathOff: 'trash',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -156,8 +156,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Settings',
|
||||
visible: false,
|
||||
imagePathOn: 'tools',
|
||||
imagePathOff: 'tools',
|
||||
iconPathOn: 'tools',
|
||||
iconPathOff: 'tools',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -173,8 +173,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -185,8 +185,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'attractive',
|
||||
imagePathOff: 'attractive',
|
||||
iconPathOn: 'attractive',
|
||||
iconPathOff: 'attractive',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -202,8 +202,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -214,8 +214,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'attractive',
|
||||
imagePathOff: 'attractive',
|
||||
iconPathOn: 'attractive',
|
||||
iconPathOff: 'attractive',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -231,8 +231,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -243,8 +243,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'attractive',
|
||||
imagePathOff: 'attractive',
|
||||
iconPathOn: 'attractive',
|
||||
iconPathOff: 'attractive',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -260,8 +260,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -272,8 +272,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'placeholder',
|
||||
imagePathOff: 'placeholder',
|
||||
iconPathOn: 'placeholder',
|
||||
iconPathOff: 'placeholder',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -289,8 +289,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -301,8 +301,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'placeholder',
|
||||
imagePathOff: 'placeholder',
|
||||
iconPathOn: 'placeholder',
|
||||
iconPathOff: 'placeholder',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -323,8 +323,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -335,8 +335,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: strategyPart.codeEditor.activate,
|
||||
label: 'Edit Code',
|
||||
visible: false,
|
||||
imagePathOn: 'html',
|
||||
imagePathOff: 'html',
|
||||
iconPathOn: 'html',
|
||||
iconPathOff: 'html',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -347,8 +347,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'attractive',
|
||||
imagePathOff: 'attractive',
|
||||
iconPathOn: 'attractive',
|
||||
iconPathOff: 'attractive',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -359,8 +359,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Delete This Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'trash',
|
||||
imagePathOff: 'trash',
|
||||
iconPathOn: 'trash',
|
||||
iconPathOff: 'trash',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -376,8 +376,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -388,8 +388,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Add Condition',
|
||||
visible: false,
|
||||
imagePathOn: 'testing',
|
||||
imagePathOff: 'testing',
|
||||
iconPathOn: 'testing',
|
||||
iconPathOff: 'testing',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -400,8 +400,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Delete This Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'trash',
|
||||
imagePathOff: 'trash',
|
||||
iconPathOn: 'trash',
|
||||
iconPathOff: 'trash',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -422,8 +422,8 @@ function newStrategyPartConstructor () {
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
imagePathOn: 'target',
|
||||
imagePathOff: 'security',
|
||||
iconPathOn: 'target',
|
||||
iconPathOff: 'security',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -434,8 +434,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: strategyPart.codeEditor.activate,
|
||||
label: 'Edit Code',
|
||||
visible: false,
|
||||
imagePathOn: 'html',
|
||||
imagePathOff: 'html',
|
||||
iconPathOn: 'html',
|
||||
iconPathOff: 'html',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
@@ -446,8 +446,8 @@ function newStrategyPartConstructor () {
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Delete This Condition',
|
||||
visible: false,
|
||||
imagePathOn: 'trash',
|
||||
imagePathOff: 'trash',
|
||||
iconPathOn: 'trash',
|
||||
iconPathOff: 'trash',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
|
||||
Reference in new issue
Block a user