diff --git a/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenuItem.js b/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenuItem.js index 81cb8a5f3..9f4a3e5d8 100644 --- a/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenuItem.js +++ b/Projects/Foundations/UI/Spaces/Floating-Space/CircularMenuItem.js @@ -111,6 +111,10 @@ function newCircularMenuItem() { iconPhysics() + if (thisObject.icon === undefined) { + console.log('[ERROR] newCircularMenuItem -> initialize -> err = Icon not found, Action: "' + thisObject.action + '", relatedUiObject: "' + thisObject.relatedUiObject +'", label: "' + thisObject.label + '"') + } + selfMouseOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver) selfMouseClickEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseClick', onMouseClick) selfMouseNotOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseNotOver', onMouseNotOver) @@ -495,6 +499,10 @@ function newCircularMenuItem() { iconSize = UI.projects.foundations.spaces.floatingSpace.style.node.menuItem.imageSize } + if (thisObject.icon === undefined) { + thisObject.icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', 'missing-image') + } + if (thisObject.icon !== undefined) { 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)