From 7abd313d9a58242b3b8bccd6ab8e799eef95a471 Mon Sep 17 00:00:00 2001 From: harrellbm Date: Tue, 3 Aug 2021 17:38:58 -0500 Subject: [PATCH 1/3] Optimize saved reference path --- .../UI/Function-Libraries/ReferenceAttachDetach.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index c50184947..4ac28b34c 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -20,6 +20,12 @@ function newFoundationsFunctionLibraryAttachDetach() { // Store the path to the reference parent to make restoring it possible if the reference partent is updated and given a new id function storeAttachNodePath(node, attachToNode) { let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(attachToNode) + // Remove unused node id, and project tag from stored path + for (let i = 0; i < attachNodePath.length; i++ ) { + attachNodePath[i].splice(2,2) + console.log(" this is spliced array ", attachNodePath) + } + // Save attach path to active payload node.payload.referenceParentCombinedNodePath = attachNodePath } From 873c7c41f1b1ab6e0ac109967c06ea5f07009f69 Mon Sep 17 00:00:00 2001 From: harrellbm Date: Tue, 3 Aug 2021 17:40:26 -0500 Subject: [PATCH 2/3] remove console log --- .../Foundations/UI/Function-Libraries/ReferenceAttachDetach.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index 4ac28b34c..e9da5d2ad 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -23,7 +23,6 @@ function newFoundationsFunctionLibraryAttachDetach() { // Remove unused node id, and project tag from stored path for (let i = 0; i < attachNodePath.length; i++ ) { attachNodePath[i].splice(2,2) - console.log(" this is spliced array ", attachNodePath) } // Save attach path to active payload From 8e2d7232a174528d4e015fe6d60cb2627939107d Mon Sep 17 00:00:00 2001 From: harrellbm Date: Tue, 3 Aug 2021 17:42:35 -0500 Subject: [PATCH 3/3] Update code comments --- .../Foundations/UI/Function-Libraries/ReferenceAttachDetach.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index e9da5d2ad..fd6338f3b 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -1,3 +1,4 @@ +// These function are used across the system to establish and remove references between nodes function newFoundationsFunctionLibraryAttachDetach() { let thisObject = { referenceDetachNode: referenceDetachNode, @@ -17,7 +18,7 @@ function newFoundationsFunctionLibraryAttachDetach() { completeAttachment(node, attachToNode) } - // Store the path to the reference parent to make restoring it possible if the reference partent is updated and given a new id + // Store the path to the reference parent to make restoring it possible if the reference parent is updated and given a new id function storeAttachNodePath(node, attachToNode) { let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(attachToNode) // Remove unused node id, and project tag from stored path