From dc77069284e7fb4b0f3473416cdaa2333dcca17c Mon Sep 17 00:00:00 2001 From: Eric VanDever Date: Tue, 23 Jun 2015 11:04:21 -0400 Subject: [PATCH] added getDataSet to network manipulation edge add and edit functions to match existing remove and node equivalents --- lib/network/modules/ManipulationSystem.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/network/modules/ManipulationSystem.js b/lib/network/modules/ManipulationSystem.js index d58e8b0c..f6a6a247 100644 --- a/lib/network/modules/ManipulationSystem.js +++ b/lib/network/modules/ManipulationSystem.js @@ -1085,7 +1085,7 @@ class ManipulationSystem { if (this.options.addEdge.length === 2) { this.options.addEdge(defaultData, (finalizedData) => { if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback - this.body.data.edges.add(finalizedData); + this.body.data.edges.getDataSet().add(finalizedData); this.selectionHandler.unselectAll(); this.showManipulatorToolbar(); } @@ -1096,7 +1096,7 @@ class ManipulationSystem { } } else { - this.body.data.edges.add(defaultData); + this.body.data.edges.getDataSet().add(defaultData); this.selectionHandler.unselectAll(); this.showManipulatorToolbar(); } @@ -1117,7 +1117,7 @@ class ManipulationSystem { this.body.emitter.emit('_redraw'); } else { - this.body.data.edges.update(finalizedData); + this.body.data.edges.getDataSet().update(finalizedData); this.selectionHandler.unselectAll(); this.showManipulatorToolbar(); } @@ -1128,7 +1128,7 @@ class ManipulationSystem { } } else { - this.body.data.edges.update(defaultData); + this.body.data.edges.getDataSet().update(defaultData); this.selectionHandler.unselectAll(); this.showManipulatorToolbar(); }