From 3e1595e32f6ed06aeac832e5048d8a81a595ab12 Mon Sep 17 00:00:00 2001 From: Max <m.giller.dev@gmail.com> Date: Mon, 4 Oct 2021 21:13:29 +0200 Subject: [PATCH] Fixed detail change for nodes and added history points --- editor/js/graph.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/editor/js/graph.js b/editor/js/graph.js index 53a27b5..094157c 100644 --- a/editor/js/graph.js +++ b/editor/js/graph.js @@ -168,7 +168,7 @@ export class Graph extends ManagedData { changeDetails(selectionDetails) { if (selectionDetails.node === true) { - this.changeNodeDetails(selectionDetails[NODE_ID].newDetails); + this.changeNodeDetails(selectionDetails[NODE_ID], selectionDetails); } else if (selectionDetails.link === true) { this.changeLinkDetails( selectionDetails[LINK_SOURCE][NODE_ID], @@ -186,10 +186,11 @@ export class Graph extends ManagedData { continue; // No } - // Changed details + // Change details nodes[i] = Object.assign(nodes[i], newDetails); // All done + this.storeCurrentData("Changed node details"); return; } } @@ -205,10 +206,11 @@ export class Graph extends ManagedData { continue; // No } - // Changed details + // Change details links[i] = Object.assign(links[i], newDetails); // All done + this.storeCurrentData("Changed link details"); return; } } -- GitLab