From 9c3a72fd7ae4762fe11af8d6268982cab88a0dc4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 1 Oct 2020 14:57:01 +0200 Subject: [PATCH] Fixes --- CanvasApp/ChartingSpace/CoordinateSystem.js | 2 +- CanvasApp/Spaces/TutorialSpace.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CanvasApp/ChartingSpace/CoordinateSystem.js b/CanvasApp/ChartingSpace/CoordinateSystem.js index 4a085c3fa..de7f0eacf 100644 --- a/CanvasApp/ChartingSpace/CoordinateSystem.js +++ b/CanvasApp/ChartingSpace/CoordinateSystem.js @@ -24,7 +24,7 @@ function newCoordinateSystem() { autoMinYScale: true, autoMaxYScale: true, HORIZONTAL_MARGIN_FACTOR: 1, - VERTICAL_MARGIN_FACTOR: 0.9, + VERTICAL_MARGIN_FACTOR: 1, HORIZONTAL_MARGIN_INVERSE_FACTOR: 0, VERTICAL_MARGIN_INVERSE_FACTOR: 0, physics: physics, diff --git a/CanvasApp/Spaces/TutorialSpace.js b/CanvasApp/Spaces/TutorialSpace.js index 089c94417..76c290158 100644 --- a/CanvasApp/Spaces/TutorialSpace.js +++ b/CanvasApp/Spaces/TutorialSpace.js @@ -417,7 +417,7 @@ function newTutorialSpace() { config.batchConfigChangesReferenceParent !== undefined ) { batchConfigChangesCounter++ - if (batchConfigChangesCounter === 5) { + if (batchConfigChangesCounter === 5 || batchConfigChangesCounter === 10) { /* Here we are going to process an array of different changes to descendents of the reference parent. The end user needs to specify a nodePath to the @@ -441,9 +441,20 @@ function newTutorialSpace() { let separator = '' for (let j = 0; j < splittedPath.length; j++) { let part = splittedPath[j] + let partialNode + let splittedParts = part.split('[') + if (splittedParts.length > 1) { + partialNode = eval(partialPath + separator + splittedParts[0]) + if (partialNode === undefined) { + console.log(MODULE_NAME + ' -> This part can not be undefined -> part = ' + splittedParts[0]) + currentNode.payload.uiObject.setErrorMessage('Node Path is incorrect. See console log for details.') + break + } + } partialPath = partialPath + separator + part separator = '.' - let partialNode = eval(partialPath) + + partialNode = eval(partialPath) if (partialNode === undefined) { console.log(MODULE_NAME + ' -> This part can not be undefined -> part = ' + part) currentNode.payload.uiObject.setErrorMessage('Node Path is incorrect. See console log for details.')