diff --git a/html/admin/js/graphViewer/graph/arangoAdapter.js b/html/admin/js/graphViewer/graph/arangoAdapter.js
index 3f0356fb1a..d0e8b85b49 100644
--- a/html/admin/js/graphViewer/graph/arangoAdapter.js
+++ b/html/admin/js/graphViewer/graph/arangoAdapter.js
@@ -380,7 +380,7 @@ function ArangoAdapter(arangodb, nodes, edges, nodeCollection, edgeCollection, w
contentType: "application/json",
processData: false,
success: function(data) {
- edgeToPatch = $.extend(edgeToPatch, patchData);
+ edgeToPatch._data = $.extend(edgeToPatch._data, patchData);
callback();
},
error: function(data) {
diff --git a/html/admin/js/graphViewer/jasmine_test/specEvents/eventDispatcherUISpec.js b/html/admin/js/graphViewer/jasmine_test/specEvents/eventDispatcherUISpec.js
index f0c95bdd7d..53310a68f9 100644
--- a/html/admin/js/graphViewer/jasmine_test/specEvents/eventDispatcherUISpec.js
+++ b/html/admin/js/graphViewer/jasmine_test/specEvents/eventDispatcherUISpec.js
@@ -58,14 +58,32 @@
beforeEach(function () {
nodes = [{
_id: 1,
- name: "Alice"
+ _rev: 1,
+ _key: 1,
+ _data: {
+ _id: 1,
+ name: "Alice"
+ }
},{
- _id: 2
+ _id: 2,
+ _rev: 2,
+ _key: 2,
+ _data: {
+ _id: 2
+ }
}];
edges = [{
source: nodes[0],
target: nodes[1],
- label: "oldLabel"
+ _data: {
+ _id: 12,
+ _rev: 12,
+ _key: 12,
+ _from: 1,
+ _to: 2,
+ label: "oldLabel"
+ }
+
}];
adapter = mocks.adapter;
layouter = mocks.layouter;
@@ -192,9 +210,7 @@
helper.simulateMouseEvent("click", "control_node_edit_submit");
expect(adapter.patchNode).toHaveBeenCalledWith(
- { _id: 1,
- name: "Alice"
- },
+ nodes[0],
{ _id: "1",
name: "Bob"
},
@@ -216,8 +232,11 @@
expect(adapter.patchEdge).toHaveBeenCalledWith(
edges[0],
{
- source: nodes[0],
- target: nodes[1],
+ _id: "12",
+ _rev: "12",
+ _key: "12",
+ _from: "1",
+ _to: "2",
label: "newLabel"
},
jasmine.any(Function));
diff --git a/html/admin/js/graphViewer/ui/eventDispatcherControls.js b/html/admin/js/graphViewer/ui/eventDispatcherControls.js
index e23074f106..eab22b82ad 100644
--- a/html/admin/js/graphViewer/ui/eventDispatcherControls.js
+++ b/html/admin/js/graphViewer/ui/eventDispatcherControls.js
@@ -85,7 +85,7 @@ function EventDispatcherControls(list, nodeShaper, edgeShaper, dispatcherConfig)
modalDialogHelper.createModalEditDialog(
"Edit Node " + n._id,
"control_node_edit_",
- n,
+ n._data,
function(newData) {
dispatcher.events.PATCHNODE(n, newData, function() {
$("#control_node_edit_modal").modal('hide');
@@ -95,9 +95,9 @@ function EventDispatcherControls(list, nodeShaper, edgeShaper, dispatcherConfig)
},
edgeCallback = function(e) {
modalDialogHelper.createModalEditDialog(
- "Edit Edge " + e.source._id + "->" + e.target._id,
+ "Edit Edge " + e._data._from + "->" + e._data._to,
"control_edge_edit_",
- e,
+ e._data,
function(newData) {
dispatcher.events.PATCHEDGE(e, newData, function() {
$("#control_edge_edit_modal").modal('hide');