diff --git a/Animation.js b/Animation.js index 3be427501..c3ee45714 100644 --- a/Animation.js +++ b/Animation.js @@ -115,7 +115,7 @@ function newAnimation() { row = 0 for (const [key, timeConsumed] of performanceMap.entries()) { row++ - labelToPrint = key + ' ' + timeConsumed.toFixed(4) + let labelToPrint = key + ' ' + timeConsumed.toFixed(4) printLabel(labelToPrint, 10, 100 + row * 30, 1, 20, UI_COLOR.RED) let percentage = timeConsumed * 100 / totalTimeConsumed labelToPrint = key + ' ' + percentage.toFixed(1) + '%' diff --git a/Canvas.js b/Canvas.js index 148ba2160..9bd6d985b 100644 --- a/Canvas.js +++ b/Canvas.js @@ -73,29 +73,30 @@ function newCanvas() { thisObject.floatingSpace.finalize() thisObject.shorcutNumbers = undefined - browserCanvas.removeEventListener('mousedown', onMouseDown, false) - browserCanvas.removeEventListener('mouseup', onMouseUp, false) - browserCanvas.removeEventListener('mousemove', onMouseMove, false) - browserCanvas.removeEventListener('click', onMouseClick, false) - browserCanvas.removeEventListener('mouseout', onMouseOut, false) - if (browserCanvas.removeEventListener) { browserCanvas.removeEventListener('mousewheel', onMouseWheel, false)// IE9, Chrome, Safari, Opera browserCanvas.removeEventListener('DOMMouseScroll', onMouseWheel, false) // Firefox - } else browserCanvas.detachEvent('onmousewheel', onMouseWheel) // IE 6/7/8 - - browserCanvas.removeEventListener('dragenter', onDragEnter, false) - browserCanvas.removeEventListener('dragleave', onDragLeave, false) - browserCanvas.removeEventListener('dragover', onDragOver, false) - browserCanvas.removeEventListener('drop', onDragDrop, false) - - browserCanvas.removeEventListener('keydown', onKeyDown, false) - browserCanvas.removeEventListener('keyup', onKeyUp, false) + browserCanvas.removeEventListener('mousedown', onMouseDown, false) + browserCanvas.removeEventListener('mouseup', onMouseUp, false) + browserCanvas.removeEventListener('mousemove', onMouseMove, false) + browserCanvas.removeEventListener('click', onMouseClick, false) + browserCanvas.removeEventListener('mouseout', onMouseOut, false) + + browserCanvas.removeEventListener('dragenter', onDragEnter, false) + browserCanvas.removeEventListener('dragleave', onDragLeave, false) + browserCanvas.removeEventListener('dragover', onDragOver, false) + browserCanvas.removeEventListener('drop', onDragDrop, false) + + browserCanvas.removeEventListener('keydown', onKeyDown, false) + browserCanvas.removeEventListener('keyup', onKeyUp, false) + } else { + browserCanvas.detachEvent('onmousewheel', onMouseWheel) // IE 6/7/8 + } thisObject.splashScreen = undefined lastContainerMouseOver = undefined - hisObject.mouse = undefined + thisObject.mouse = undefined } catch (err) { if (ERROR_LOG === true) { logger.write('[ERROR] finalize -> err = ' + err.stack) } } @@ -544,7 +545,7 @@ function newCanvas() { } else { /* After the warning, we allow the key to be re-assigned */ nodeUsingThisKey.payload.uiObject.shortcutKey = '' - nodeUsingThisKey === undefined + nodeUsingThisKey = undefined nodeOnFocus.payload.uiObject.shortcutKey = event.key nodeOnFocus.payload.uiObject.valueAtAngle = false nodeOnFocus.payload.uiObject.setValue('Shortcut Key: Ctrl + Alt + ' + event.key) diff --git a/ChartingSpace/TimeMachine.js b/ChartingSpace/TimeMachine.js index 5ca3031da..5152aee44 100644 --- a/ChartingSpace/TimeMachine.js +++ b/ChartingSpace/TimeMachine.js @@ -645,8 +645,8 @@ function newTimeMachine() { } function drawLabel() { - if (thisObject.payload.node === undefined) { return } if (thisObject.payload === undefined) { return } + if (thisObject.payload.node === undefined) { return } /* Draw Title Above the Container */ let position = { x: 0, @@ -688,7 +688,7 @@ function newTimeMachine() { for (let j = 0; j < layers.length; j++) { let layer = layers[j] - exchangeMarket = { + let exchangeMarket = { exchangeName: layer.exchange.name, marketName: layer.market, exchangeIcon: layer.exchangeIcon, diff --git a/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js b/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js index 66b356307..7948f8fdf 100644 --- a/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js @@ -331,7 +331,7 @@ function newCryptoEcosystemFunctions() { Create everything inside the session references. */ for (let j = 0; j < marketTradingProducts.sessionReferences.length; j++) { - sessionReference = marketTradingProducts.sessionReferences[j] + let sessionReference = marketTradingProducts.sessionReferences[j] menuClick(sessionReference, 'Add All Trading Mine Products', true) menuClickOfNodeArray(sessionReference.tradingMineProducts, 'Add All Data Products', true) sessionReference.payload.floatingObject.collapseToggle() diff --git a/DesignSpace/Workspace/FunctionLibraries/NodeDeleter.js b/DesignSpace/Workspace/FunctionLibraries/NodeDeleter.js index 99b1d656f..f02631561 100644 --- a/DesignSpace/Workspace/FunctionLibraries/NodeDeleter.js +++ b/DesignSpace/Workspace/FunctionLibraries/NodeDeleter.js @@ -119,8 +119,8 @@ function newNodeDeleter() { } function cleanNode(node) { - if (node.payload === undefined) { return } if (node === undefined) { return } + if (node.payload === undefined) { return } node.payload.targetPosition.x = undefined node.payload.targetPosition.y = undefined diff --git a/DesignSpace/Workspace/FunctionLibraries/OnFocus.js b/DesignSpace/Workspace/FunctionLibraries/OnFocus.js index 1b8bdff6e..bbbed3985 100644 --- a/DesignSpace/Workspace/FunctionLibraries/OnFocus.js +++ b/DesignSpace/Workspace/FunctionLibraries/OnFocus.js @@ -25,8 +25,7 @@ function newOnFocus() { case 'node': { if (property.name !== previousPropertyName) { if (node[property.name] !== undefined) { - let child - child = getNodeThatIsOnFocus(node[property.name]) + let child = getNodeThatIsOnFocus(node[property.name]) if (child !== undefined) { return child } @@ -39,7 +38,7 @@ function newOnFocus() { let nodePropertyArray = node[property.name] if (nodePropertyArray !== undefined) { for (let m = 0; m < nodePropertyArray.length; m++) { - child = getNodeThatIsOnFocus(nodePropertyArray[m]) + let child = getNodeThatIsOnFocus(nodePropertyArray[m]) if (child !== undefined) { return child } diff --git a/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js b/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js index 5b8ffe35a..05ad18598 100644 --- a/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js +++ b/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js @@ -19,7 +19,7 @@ function newReferenceAttachDetach() { } function completeDetachment(node) { - if (node.payload !== undefined !== undefined) { + if (node.payload !== undefined) { if (node.payload.referenceParent !== undefined) { if (node.payload.referenceParent.payload !== undefined) { if (node.payload.referenceParent.payload.uiObject !== undefined) { diff --git a/DesignSpace/Workspace/FunctionLibraries/ShortcutKeys.js b/DesignSpace/Workspace/FunctionLibraries/ShortcutKeys.js index 94d7058eb..6d3a76aa5 100644 --- a/DesignSpace/Workspace/FunctionLibraries/ShortcutKeys.js +++ b/DesignSpace/Workspace/FunctionLibraries/ShortcutKeys.js @@ -24,8 +24,7 @@ function newShortcutKeys() { case 'node': { if (property.name !== previousPropertyName) { if (node[property.name] !== undefined) { - let child - child = getNodeByShortcutKey(node[property.name], searchingKey) + let child = getNodeByShortcutKey(node[property.name], searchingKey) if (child !== undefined) { return child } @@ -38,7 +37,7 @@ function newShortcutKeys() { let nodePropertyArray = node[property.name] if (nodePropertyArray !== undefined) { for (let m = 0; m < nodePropertyArray.length; m++) { - child = getNodeByShortcutKey(nodePropertyArray[m], searchingKey) + let child = getNodeByShortcutKey(nodePropertyArray[m], searchingKey) if (child !== undefined) { return child } diff --git a/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js b/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js index e13514eab..69706be31 100644 --- a/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js +++ b/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js @@ -335,6 +335,7 @@ function newUiObjectsFromNodes() { if (nodeDefinition === undefined) { console.log('Cannot addUIOBject of ' + type + ' because that type it is not defined at the APP_SCHEMA.') + return } if (nodeDefinition.initialValues !== undefined) { @@ -384,14 +385,12 @@ function newUiObjectsFromNodes() { } } - if (nodeDefinition !== undefined) { - if (nodeDefinition.initialValues !== undefined) { - if (nodeDefinition.initialValues.code !== undefined) { - object.code = nodeDefinition.initialValues.code - } - if (nodeDefinition.initialValues.config !== undefined) { - object.config = nodeDefinition.initialValues.config - } + if (nodeDefinition.initialValues !== undefined) { + if (nodeDefinition.initialValues.code !== undefined) { + object.code = nodeDefinition.initialValues.code + } + if (nodeDefinition.initialValues.config !== undefined) { + object.config = nodeDefinition.initialValues.config } } diff --git a/FloatingSpace/CodeEditor.js b/FloatingSpace/CodeEditor.js index 09d615a80..0c3e21d80 100644 --- a/FloatingSpace/CodeEditor.js +++ b/FloatingSpace/CodeEditor.js @@ -185,7 +185,7 @@ function newCodeEditor() { browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY - if (label !== undefined && thisObject.currentRadius >= thisObject.targetRadius) { + if (thisObject.currentRadius >= thisObject.targetRadius) { labelPoint = { x: iconPosition.x + thisObject.currentRadius + 10, y: iconPosition.y + fontSize * FONT_ASPECT_RATIO diff --git a/FloatingSpace/ConfigEditor.js b/FloatingSpace/ConfigEditor.js index dee760f94..8c29a1b51 100644 --- a/FloatingSpace/ConfigEditor.js +++ b/FloatingSpace/ConfigEditor.js @@ -190,7 +190,7 @@ function newConfigEditor() { browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY - if (label !== undefined && thisObject.currentRadius >= thisObject.targetRadius) { + if (thisObject.currentRadius >= thisObject.targetRadius) { labelPoint = { x: iconPosition.x + thisObject.currentRadius + 10, y: iconPosition.y + fontSize * FONT_ASPECT_RATIO diff --git a/FloatingSpace/FormulaEditor.js b/FloatingSpace/FormulaEditor.js index e749b5c57..d663ea1a0 100644 --- a/FloatingSpace/FormulaEditor.js +++ b/FloatingSpace/FormulaEditor.js @@ -184,7 +184,7 @@ function newFormulaEditor() { browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY - if (label !== undefined && thisObject.currentRadius >= thisObject.targetRadius) { + if (thisObject.currentRadius >= thisObject.targetRadius) { labelPoint = { x: iconPosition.x + thisObject.currentRadius + 10, y: iconPosition.y + fontSize * FONT_ASPECT_RATIO diff --git a/FloatingSpace/Picker.js b/FloatingSpace/Picker.js index 4d3a25759..9bf051871 100644 --- a/FloatingSpace/Picker.js +++ b/FloatingSpace/Picker.js @@ -71,10 +71,6 @@ function newPicker() { isMouseOver = false } - function getSelected() { - return optionsList[selected] - } - function setSelected(pOptionsList, pCurrent, pParent, pSelected) { if (pOptionsList !== undefined) { optionsList = pOptionsList diff --git a/FloatingSpace/UiObject.js b/FloatingSpace/UiObject.js index ec3c12ca5..01a08ca54 100644 --- a/FloatingSpace/UiObject.js +++ b/FloatingSpace/UiObject.js @@ -580,10 +580,8 @@ function newUiObject() { let THRESHOLD = 1.15 - if (previousDistanceToChainParent !== undefined) { - if (ratio > THRESHOLD) { - canvas.designSpace.workspace.chainDetachNode(thisObject.payload.node) - } + if (ratio > THRESHOLD) { + canvas.designSpace.workspace.chainDetachNode(thisObject.payload.node) } } @@ -675,9 +673,10 @@ function newUiObject() { function referenceDetachingPhysics() { if (isDragging !== true) { return } + if (thisObject.payload === undefined) { return } if (thisObject.payload.floatingObject.isFrozen === true) { return } if (rightDragging === false) { return } - if (thisObject.payload === undefined) { return } + if (thisObject.payload.referenceParent === undefined) { return } let distanceToReferenceParent = Math.sqrt(Math.pow(thisObject.payload.position.x - thisObject.payload.referenceParent.payload.position.x, 2) + Math.pow(thisObject.payload.position.y - thisObject.payload.referenceParent.payload.position.y, 2)) @@ -689,14 +688,11 @@ function newUiObject() { previousDistanceToReferenceParent = distanceToReferenceParent if (thisObject.isOnFocus !== true) { return } - if (thisObject.payload.referenceParent === undefined) { return } let THRESHOLD = 1.15 - if (previousDistanceToReferenceParent !== undefined) { - if (ratio > THRESHOLD) { - canvas.designSpace.workspace.referenceDetachNode(thisObject.payload.node) - } + if (ratio > THRESHOLD) { + canvas.designSpace.workspace.referenceDetachNode(thisObject.payload.node) } } @@ -1531,6 +1527,16 @@ function newUiObject() { label = addIndexNumber(label) if (label !== undefined) { + + if (canvas.floatingSpace.inMapMode === true) { + let nodeDefinition = getNodeDefinition(thisObject.payload.node) + if (nodeDefinition !== undefined) { + if (nodeDefinition.isHierarchyHead !== true) { + return + } + } + } + if (label.length > MAX_LABEL_LENGTH) { label = label.substring(0, MAX_LABEL_LENGTH) + '...' } @@ -1543,18 +1549,12 @@ function newUiObject() { } else { labelPoint = { x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5, - y: position.y + thisObject.payload.floatingObject.currentImageSize / 2 + lineSeparator * 1 + y: position.y + thisObject.payload.floatingObject.currentImageSize / 2 + lineSeparator * 1 } } if (canvas.floatingSpace.inMapMode === true) { - labelPoint.y = labelPoint.y - 20 - let nodeDefinition = getNodeDefinition(thisObject.payload.node) - if (nodeDefinition !== undefined) { - if (nodeDefinition.isHierarchyHead !== true) { - return - } - } + labelPoint.y = position.y + 50 / 2 + lineSeparator * 1 } browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY @@ -1600,7 +1600,7 @@ function newUiObject() { position = canvas.floatingSpace.transformPointToMap(position) } - let radius = thisObject.payload.floatingObject.container.frame.radius + let radius = thisObject.payload.floatingObject.container.frame.radius /* Label Text */ let labelPoint let fontSize = thisObject.payload.floatingObject.currentFontSize * 3 / 4 @@ -1661,10 +1661,10 @@ function newUiObject() { position = canvas.floatingSpace.transformPointToMap(position) } - let radius = thisObject.payload.floatingObject.container.frame.radius + let radius = thisObject.payload.floatingObject.container.frame.radius /* Label Text */ let labelPoint - let fontSize = thisObject.payload.floatingObject.currentFontSize + let fontSize = thisObject.payload.floatingObject.currentFontSize let lineSeparator = thisObject.payload.floatingObject.currentFontSize * 1.2 let label @@ -1732,10 +1732,10 @@ function newUiObject() { position = canvas.floatingSpace.transformPointToMap(position) } - let radius = thisObject.payload.floatingObject.container.frame.radius + let radius = thisObject.payload.floatingObject.container.frame.radius /* Label Text */ let labelPoint - let fontSize = thisObject.payload.floatingObject.currentFontSize + let fontSize = thisObject.payload.floatingObject.currentFontSize let lineSeparator = thisObject.payload.floatingObject.currentFontSize * 1.2 let label @@ -1744,27 +1744,26 @@ function newUiObject() { label = Number(currentPercentage).toFixed(0) + '%' - if (label !== undefined) { - if (label.length > MAX_LABEL_LENGTH) { - label = label.substring(0, MAX_LABEL_LENGTH) + '...' - } - - if (thisObject.isOnFocus === true) { - labelPoint = { - x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5, - y: position.y + radius * 2 / 3 + lineSeparator * 4 + 15 - } - } else { - labelPoint = { - x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10, - y: position.y + thisObject.payload.floatingObject.currentImageSize / 2 + lineSeparator * 4 - } - } - - browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY - browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TURQUOISE + ', 1)' - browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y) + if (label.length > MAX_LABEL_LENGTH) { + label = label.substring(0, MAX_LABEL_LENGTH) + '...' } + + if (thisObject.isOnFocus === true) { + labelPoint = { + x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5, + y: position.y + radius * 2 / 3 + lineSeparator * 4 + 15 + } + } else { + labelPoint = { + x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10, + y: position.y + thisObject.payload.floatingObject.currentImageSize / 2 + lineSeparator * 4 + } + } + + browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TURQUOISE + ', 1)' + browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y) + } } @@ -1783,7 +1782,7 @@ function newUiObject() { position = canvas.floatingSpace.transformPointToMap(position) } - let radius = thisObject.payload.floatingObject.container.frame.radius + let radius = thisObject.payload.floatingObject.container.frame.radius /* Label Text */ let labelPoint let fontSize = thisObject.payload.floatingObject.currentFontSize * 6 / 4 / 2 @@ -2174,15 +2173,17 @@ function newUiObject() { let additionalImageSize = 0 if (isRunningAtBackend === true || isReadyToReferenceAttach === true || isReadyToChainAttach === true) { additionalImageSize = 20 } let totalImageSize = additionalImageSize + thisObject.payload.floatingObject.currentImageSize + + let nodeDefinition = getNodeDefinition(thisObject.payload.node) + if (nodeDefinition === undefined) { return } + if (canvas.floatingSpace.inMapMode === true) { - totalImageSize = canvas.floatingSpace.transformImagesizeToMap(totalImageSize) - let nodeDefinition = getNodeDefinition(thisObject.payload.node) - if (nodeDefinition !== undefined) { - if (nodeDefinition.isHierarchyHead !== true) { - totalImageSize = totalImageSize / 4 - } + if (nodeDefinition.isHierarchyHead === true) { + totalImageSize = 50 + } else { + totalImageSize = canvas.floatingSpace.transformImagesizeToMap(totalImageSize) } - } + } if (thisObject.isShowing === true) { totalImageSize = 50 diff --git a/FloatingSpace/UiObjectTitle.js b/FloatingSpace/UiObjectTitle.js index 1fe566f5b..bb32d7402 100644 --- a/FloatingSpace/UiObjectTitle.js +++ b/FloatingSpace/UiObjectTitle.js @@ -168,20 +168,6 @@ function newUiObjectTitle() { } break } - case 'Use Reference Parent Parent Parent': { - let nodeToUse = thisObject.payload.node.payload.referenceParent - if (nodeToUse !== undefined && nodeToUse.payload !== undefined) { - nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode - if (nodeToUse !== undefined && nodeToUse.payload !== undefined) { - nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode.payload.parentNode - if (nodeToUse !== undefined && nodeToUse.payload !== undefined) { - thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title - thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.payload.node.name - } - } - } - break - } default: { if (titleReference.indexOf('Use Child @') === 0) { let propertyName = titleReference.substring(titleReference.indexOf('@') + 1, titleReference.length) diff --git a/Panels/Layer.js b/Panels/Layer.js index 7ffe83133..85fd1a020 100644 --- a/Panels/Layer.js +++ b/Panels/Layer.js @@ -296,9 +296,10 @@ function newLayer() { function getIcon(node) { let nodeDefinition = getNodeDefinition(node) let iconName + let icon if (nodeDefinition.alternativeIcons !== undefined) { for (let i = 0; i < nodeDefinition.alternativeIcons.length; i++) { - alternativeIcon = nodeDefinition.alternativeIcons[i] + let alternativeIcon = nodeDefinition.alternativeIcons[i] if (alternativeIcon.codeName === node.config.codeName) { iconName = alternativeIcon.iconName } diff --git a/Panels/LayersPanel.js b/Panels/LayersPanel.js index beb42bad5..9fff6cf45 100644 --- a/Panels/LayersPanel.js +++ b/Panels/LayersPanel.js @@ -381,7 +381,7 @@ function newLayersPanel() { let found = removeFromLocalLayers(layerNode.id) if (found !== true) { - layer = addLayer(layerNode) + let layer = addLayer(layerNode) if (layer !== undefined) { onLayerStatusChanged(layer) } diff --git a/Panels/PanelsVisibleButton.js b/Panels/PanelsVisibleButton.js index 7c2528eba..ddede0157 100644 --- a/Panels/PanelsVisibleButton.js +++ b/Panels/PanelsVisibleButton.js @@ -60,7 +60,7 @@ function newPanelsVisibleButton() { function setPanelVisibility() { for (let i = 0; i < thisObject.panels.length; i++) { - panel = canvas.panelsSpace.getPanel(thisObject.panels[i]) + let panel = canvas.panelsSpace.getPanel(thisObject.panels[i]) panel.isVisible = thisObject.showPanels } } diff --git a/Plotting/Plotter.js b/Plotting/Plotter.js index bcb956121..9798539f6 100644 --- a/Plotting/Plotter.js +++ b/Plotting/Plotter.js @@ -891,7 +891,7 @@ function newPlotter() { } } - if (coordinateSystem.autoMinYScale === true || coordinateSystem.autoMinYScale === true) { + if (coordinateSystem.autoMinYScale === true || coordinateSystem.autoMaxYScale === true) { mustRecalculateDataPoints = true } else { mustRecalculateDataPoints = false diff --git a/Plotting/RecordValues.js b/Plotting/RecordValues.js index 118bcda60..707b38e73 100644 --- a/Plotting/RecordValues.js +++ b/Plotting/RecordValues.js @@ -115,7 +115,6 @@ function newRecordValues() { function applyValue(node, value, minDecimals) { if (canvas.chartingSpace.visible !== true) { return } if (node === undefined) { return } - if (node === undefined) { return } if (node.payload === undefined) { return } if (node.payload.uiObject === undefined) { return } if (value === true) { value = 'true' } diff --git a/Scales/RateScale.js b/Scales/RateScale.js index 216de1e8e..54afd0b99 100644 --- a/Scales/RateScale.js +++ b/Scales/RateScale.js @@ -176,6 +176,11 @@ function newRateScale() { return } } else { + if (event.shiftKey === true) { + sensitivity = 20 + } else { + sensitivity = 5 + } if (wheelDeltaDirection === 1) { wheelDeltaCounter++ if (wheelDeltaCounter < sensitivity) { diff --git a/Scales/TimeFrameScale.js b/Scales/TimeFrameScale.js index 0d4becfbe..c6d34dfb2 100644 --- a/Scales/TimeFrameScale.js +++ b/Scales/TimeFrameScale.js @@ -261,6 +261,11 @@ function newTimeFrameScale() { return } } else { + if (event.shiftKey === true) { + sensitivity = 20 + } else { + sensitivity = 5 + } if (wheelDeltaDirection === 1) { wheelDeltaCounter++ if (wheelDeltaCounter < sensitivity) { diff --git a/Scales/TimeScale.js b/Scales/TimeScale.js index af0a3dbc8..f2915426c 100644 --- a/Scales/TimeScale.js +++ b/Scales/TimeScale.js @@ -127,6 +127,11 @@ function newTimeScale() { return } } else { + if (event.shiftKey === true) { + sensitivity = 20 + } else { + sensitivity = 5 + } if (wheelDeltaDirection === 1) { wheelDeltaCounter++ if (wheelDeltaCounter < sensitivity) { diff --git a/SideSpace/ListView.js b/SideSpace/ListView.js index 16474d696..c1f49199b 100644 --- a/SideSpace/ListView.js +++ b/SideSpace/ListView.js @@ -182,8 +182,6 @@ function newListView() { function physics() { if (isInitialized === false || thisObject.isVisible === false) { return } - if (isInitialized === false) { return } - if (thisObject.isVisible === false) { return } childrenPhysics() } diff --git a/Spaces/TutorialSpace.js b/Spaces/TutorialSpace.js index 829c7142d..72ff6f7e1 100644 --- a/Spaces/TutorialSpace.js +++ b/Spaces/TutorialSpace.js @@ -191,14 +191,6 @@ function newTutorialSpace() { } } - function checkViewportZoomAtCenter() { - if (currentNode === undefined) { return } - let config = JSON.parse(currentNode.config) - if (config.viewportZoomAtCenter !== undefined) { - canvas.chartingSpace.viewport.zoomAtCenter(config.viewportZoomAtCenter) - } - } - function checkPressButton() { if (currentNode === undefined) { return } let config = JSON.parse(currentNode.config) diff --git a/VideoRecorder.js b/VideoRecorder.js index 551db0ef7..88ff5a672 100644 --- a/VideoRecorder.js +++ b/VideoRecorder.js @@ -63,7 +63,7 @@ function newVideoRecorder() { let key = canvas.mouse.event.key if (key === undefined) { break } switch (key.toLowerCase()) { - case 'Escape': + case 'escape': { pointerIcon = canvas.designSpace.iconCollection.get('key-m') break