Merge pull request #1475 from Smidy13/develop

Bug Fix: Adding in iconProject to fix broken CircularMenuItems
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-08-17 14:28:39 -04:00
commit 1483043e66
5 files changed
+16 -4

No files matched your search

@@ -9,8 +9,8 @@
},
{
"action": "Add UI Object",
"label": "Add Dependency Product Folder",
"relatedUiObject": "Dependency Product Folder",
"label": "Add Data Dependency Folder",
"relatedUiObject": "Data Dependency Folder",
"actionFunction": "payload.executeAction"
},
{
@@ -10,6 +10,7 @@
{
"action": "Add UI Object",
"label": "Add Tutorial",
"iconProject": "Education",
"relatedUiObject": "Tutorial",
"actionFunction": "payload.executeAction"
},
@@ -4,6 +4,7 @@
{
"action": "Add Missing Plugin Tutorials",
"label": "Add Missing Tutorials",
"iconProject": "Education",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
@@ -73,6 +73,7 @@ function newCircularMenu() {
menuItem.visible = menuItemInitialValue.visible
menuItem.iconPathOn = menuItemInitialValue.iconPathOn
menuItem.iconPathOff = menuItemInitialValue.iconPathOff
menuItem.iconProject = menuItemInitialValue.iconProject
menuItem.rawRadius = menuItemInitialValue.rawRadius
menuItem.targetRadius = menuItemInitialValue.label
menuItem.currentRadius = menuItemInitialValue.currentRadius
@@ -9,6 +9,7 @@ function newCircularMenuItem() {
confirmationLabel: undefined,
iconOn: undefined,
iconOff: undefined,
iconProject: undefined,
icons: undefined,
currentIcon: undefined,
disableIfPropertyIsDefined: undefined,
@@ -94,6 +95,7 @@ function newCircularMenuItem() {
thisObject.container = undefined
thisObject.iconOn = undefined
thisObject.iconOff = undefined
thisObject.iconProject = undefined
thisObject.icons = undefined
thisObject.currentIcon = undefined
thisObject.payload = undefined
@@ -261,11 +263,18 @@ function newCircularMenuItem() {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.secondaryIcon)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.secondaryIcon)
} else {
if (thisObject.relatedUiObject !== undefined) {
if (thisObject.label === "Add Dependency Product Folder") { console.log ("Test") }
if (thisObject.relatedUiObject !== undefined && thisObject.iconProject !== undefined) {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(thisObject.iconProject, thisObject.relatedUiObject)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(thisObject.iconProject, thisObject.relatedUiObject)
} else if (thisObject.relatedUiObject !== undefined && thisObject.iconProject === undefined) {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(thisObject.payload.node.project, thisObject.relatedUiObject)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(thisObject.payload.node.project, thisObject.relatedUiObject)
} else {
if (thisObject.iconPathOn !== undefined && thisObject.iconPathOff !== undefined) {
if (thisObject.iconPathOn !== undefined && thisObject.iconPathOff !== undefined && thisObject.iconProject !== undefined) {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(thisObject.iconProject, thisObject.iconPathOn)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(thisObject.iconProject, thisObject.iconPathOff)
} else if (thisObject.iconPathOn !== undefined && thisObject.iconPathOff !== undefined && thisObject.iconProject === undefined) {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.iconPathOn)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.iconPathOff)
} else {