diff --git a/Canvas.js b/Canvas.js index 7745830a2..cb22a7308 100644 --- a/Canvas.js +++ b/Canvas.js @@ -758,7 +758,7 @@ function newCanvas () { let container - /* We check if the mouse is over an element of the Strategy Space / */ + /* We check if the mouse is over an element of the Designe Space / */ if (thisObject.designSpace !== undefined) { container = thisObject.designSpace.getContainer(point) diff --git a/DesignSpace/Workspace/Workspace.js b/DesignSpace/Workspace/Workspace.js index 415d34e58..41d4fd779 100644 --- a/DesignSpace/Workspace/Workspace.js +++ b/DesignSpace/Workspace/Workspace.js @@ -412,6 +412,17 @@ function newWorkspace () { referenceDetachNode(payload.node) } break + case 'Open Documentation': + { + let definition = APP_SCHEMA_MAP.get(payload.node.type) + if (definition !== undefined) { + if (definition.docURL !== undefined) { + let newTab = window.open(definition.docURL, '_blank') + newTab.focus() + } + } + } + break } } } diff --git a/FloatingSpace/CircularMenu.js b/FloatingSpace/CircularMenu.js index 0e81863c4..93a940068 100644 --- a/FloatingSpace/CircularMenu.js +++ b/FloatingSpace/CircularMenu.js @@ -49,7 +49,7 @@ function newCircularMenu () { let iconAndTextArray = [] let iconOnlyArray - let ringsArray = [[], [], []] + let ringsArray = [[], [], [], []] for (let i = 0; i < menuItemsInitialValues.length; i++) { let menuItem = newCircularMenuItem() @@ -103,15 +103,18 @@ function newCircularMenu () { menuItems.push(menuItem) } - /* There are 3 possible rings of icons, we will go through each of them here. */ - let amplitudeArray = [80, 50, 40] - let initialAngleArray = [220, 205, 200] - for (let j = 1; j < 4; j++) { + /* There are 4 possible rings of icons, we will go through each of them here. */ + let amplitudeArray = [80, 50, 40, 80] + let initialAngleArray = [220, 205, 200, 180] + for (let j = 1; j < ringsArray.length + 1; j++) { let iconOnlyArray = ringsArray[j - 1] /* Here we calculate the angles for each menu item, and then apply it if it was not previously defined. */ let amplitude = amplitudeArray[j - 1] let initialAngle = initialAngleArray[j - 1] let step = amplitude / (iconOnlyArray.length - 1) + if (iconOnlyArray.length === 1) { + step = 0 + } for (let i = 0; i < iconOnlyArray.length; i++) { let menuItem = iconOnlyArray[i] diff --git a/FloatingSpace/CircularMenuItem.js b/FloatingSpace/CircularMenuItem.js index af5c83a95..64c2d220f 100644 --- a/FloatingSpace/CircularMenuItem.js +++ b/FloatingSpace/CircularMenuItem.js @@ -150,15 +150,19 @@ function newCircularMenuItem () { if (thisObject.type === 'Icon Only') { switch (thisObject.ring) { case 1: { - radiusGrowthFactor = 6 + radiusGrowthFactor = 6.5 break } case 2: { - radiusGrowthFactor = 4.5 + radiusGrowthFactor = 5.0 break } case 3: { - radiusGrowthFactor = 3 + radiusGrowthFactor = 3.5 + break + } + case 4: { + radiusGrowthFactor = 2.5 break } } diff --git a/FloatingSpace/UiObject.js b/FloatingSpace/UiObject.js index cbba06149..1d94d1b7f 100644 --- a/FloatingSpace/UiObject.js +++ b/FloatingSpace/UiObject.js @@ -54,7 +54,7 @@ function newUiObject () { let executingIcon let selfFocusEventSubscriptionId - let selfNotFocuskEventSubscriptionId + let selfNotFocusEventSubscriptionId let selfDisplaceEventSubscriptionId let selfDragStartedEventSubscriptionId let selfDragFinishedEventSubscriptionId @@ -106,7 +106,7 @@ function newUiObject () { systemEventHandler.stopListening(key, eventSubscriptionIdOnStopped, 'UiObject') thisObject.container.eventHandler.stopListening(selfFocusEventSubscriptionId) - thisObject.container.eventHandler.stopListening(selfNotFocuskEventSubscriptionId) + thisObject.container.eventHandler.stopListening(selfNotFocusEventSubscriptionId) thisObject.container.eventHandler.stopListening(selfDisplaceEventSubscriptionId) thisObject.container.eventHandler.stopListening(selfDragStartedEventSubscriptionId) thisObject.container.eventHandler.stopListening(selfDragFinishedEventSubscriptionId) @@ -168,7 +168,7 @@ function newUiObject () { iconPhysics() selfFocusEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onFocus', onFocus) - selfNotFocuskEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onNotFocus', onNotFocus) + selfNotFocusEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onNotFocus', onNotFocus) selfDisplaceEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onDisplace', onDisplace) selfDragStartedEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onDragStarted', onDragStarted) selfDragFinishedEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onDragFinished', onDragFinished) diff --git a/FloatingSpace/UiObjectConstructor.js b/FloatingSpace/UiObjectConstructor.js index 82077883e..215f9f742 100644 --- a/FloatingSpace/UiObjectConstructor.js +++ b/FloatingSpace/UiObjectConstructor.js @@ -274,6 +274,21 @@ function newUiObjectConstructor () { ring: 3 } ) + + menuItemsInitialValues.push( + { + action: 'Open Documentation', + actionFunction: floatingObject.payload.onMenuItemClick, + label: undefined, + visible: true, + iconPathOn: 'quality', + iconPathOff: 'quality', + rawRadius: 8, + targetRadius: 0, + currentRadius: 0, + ring: 4 + } + ) } function getMenuItemsInitialValues (uiObject, floatingObject, payload) { diff --git a/Frame.js b/Frame.js index 04cec82ad..ea2b7ab12 100644 --- a/Frame.js +++ b/Frame.js @@ -209,7 +209,7 @@ function newFrame () { } /* Now we check if the resulting point is whin the current Frame. */ - + if (isNaN(checkPoint.x) || isNaN(checkPoint.y)) { return false } if (thisObject.type === 'Circle') { let distance = Math.sqrt(Math.pow(thisObject.position.x - point.x, 2) + Math.pow(thisObject.position.y - point.y, 2)) diff --git a/Spaces/DesignSpace.js b/Spaces/DesignSpace.js index c727b5a7b..cea2a4637 100644 --- a/Spaces/DesignSpace.js +++ b/Spaces/DesignSpace.js @@ -1,6 +1,6 @@ function newDesignSpace () { - const MODULE_NAME = 'Strategy Space' + const MODULE_NAME = 'Designe Space' let thisObject = { sidePanel: undefined, container: undefined,