Help Implementation

This commit is contained in:
Luis Fernando Molina committed 2020-03-10 13:00:40 +01:00
1 parent c174ae57b1
commit 35e41271ed
8 files changed
+47 -14

No files matched your search

+1 -1
View File
@@ -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)
+11
View File
@@ -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
}
}
}
+8 -5
View File
@@ -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]
+7 -3
View File
@@ -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
}
}
+3 -3
View File
@@ -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)
+15
View File
@@ -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) {
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -1,6 +1,6 @@
function newDesignSpace () {
const MODULE_NAME = 'Strategy Space'
const MODULE_NAME = 'Designe Space'
let thisObject = {
sidePanel: undefined,
container: undefined,