diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/graphViewer.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/graphViewer.js index b86b2ba945..0cc5a57253 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/graphViewer.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/graphViewer.js @@ -289,11 +289,11 @@ var tmpNodes = {}; var tmpEdges = {}; - _.each(this.graphData.modified.nodes, function (node) { + _.each(this.currentGraph.graph.nodes(), function (node) { tmpNodes[node.id] = undefined; }); - _.each(this.graphData.modified.edges, function (edge) { + _.each(self.currentGraph.graph.edges(), function (edge) { tmpEdges[edge.id] = undefined; }); @@ -358,7 +358,7 @@ self.nodeEdgesCount = {}; var handledEdges = {}; - _.each(this.graphData.modified.edges, function (edge) { + _.each(this.currentGraph.graph.edges(), function (edge) { if (handledEdges[edge.id] === undefined) { handledEdges[edge.id] = true; @@ -394,13 +394,25 @@ }, switchEdgeType: function (edgeType) { + var data = { + nodes: this.currentGraph.graph.nodes(), + edges: this.currentGraph.graph.edges(), + settings: {} + }; + this.killCurrentGraph(); - this.renderGraph(this.graphData.modified, null, false, null, null, edgeType); + this.renderGraph(data, null, false, null, null, edgeType); }, switchLayout: function (layout) { + var data = { + nodes: this.currentGraph.graph.nodes(), + edges: this.currentGraph.graph.edges(), + settings: {} + }; + this.killCurrentGraph(); - this.renderGraph(this.graphData.modified, null, false, layout); + this.renderGraph(data, null, false, layout); if ($('#g_nodeColorByCollection').val() === 'true') { this.switchNodeColorByCollection(true); @@ -1696,12 +1708,6 @@ renderGraph: function (graph, toFocus, aqlMode, layout, renderer, edgeType) { var self = this; - - if (this.graphData === undefined) { - this.graphData = {}; - this.graphData.modified = graph; - } - this.graphSettings = graph.settings; var color = '#2ecc71'; @@ -2114,7 +2120,7 @@ // allow draggin nodes } else if (self.algorithm === 'force') { // add buttons for start/stopping calculation - var style2 = 'color: rgb(64, 74, 83); cursor: pointer; position: absolute; right: 30px; bottom: 40px;'; + var style2 = 'color: rgb(64, 74, 83); cursor: pointer; position: absolute; right: 30px; bottom: 40px; z-index: 9999;'; if (self.aqlMode) { style2 = 'color: rgb(64, 74, 83); cursor: pointer; position: absolute; right: 30px; margin-top: -30px;'; diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/queryView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/queryView.js index cafcac6d05..f4bb0f4dd7 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/queryView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/queryView.js @@ -1517,7 +1517,7 @@ }); data.bindVars = this.bindParamTableObj; } - if (Object.keys(data.bindVars).length > 0) { + if (Object.keys(bindVars).length > 0) { data.bindVars = bindVars; }