X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=static%2Ftopology3D%2Fjs%2Fgraph_editor.js;h=8343f05a9d05939af87d43db9086d894e1dad6fe;hb=d3e9f5c6b209bf4ee742f1781364f5dc4103539d;hp=36e7c8e4be9d7182ab842ff1d18d4814c66f7d0c;hpb=fb37bca4b7e8178c65df2f1496afe372c1d55e78;p=osm%2FLW-UI.git diff --git a/static/topology3D/js/graph_editor.js b/static/topology3D/js/graph_editor.js index 36e7c8e..8343f05 100755 --- a/static/topology3D/js/graph_editor.js +++ b/static/topology3D/js/graph_editor.js @@ -184,7 +184,7 @@ dreamer.GraphEditor = (function (global) { this.container = chart.parent(); $(window).on("resize", function() { - var palette_width = $("#palette").width() + var palette_width = ($("#palette").length > 0) ? $("#palette").width() : 0; var working_width = self.container.width() - palette_width; self.width = (working_width < 0) ? 0 : working_width; self.height = self.container.height(); @@ -197,7 +197,7 @@ dreamer.GraphEditor = (function (global) { GraphEditor.prototype.get_d3_symbol = function (myString) { - log(myString) + switch (myString) { case "circle": return d3.symbolCircle; @@ -227,7 +227,6 @@ dreamer.GraphEditor = (function (global) { GraphEditor.prototype.get_name_from_d3_symbol = function (mySymbol) { - //log(myString) switch (mySymbol) { case d3.symbolCircle: return "circle"; @@ -372,7 +371,7 @@ dreamer.GraphEditor = (function (global) { * @returns {boolean} */ GraphEditor.prototype.addLink = function (link) { - console.log(JSON.stringify(link)) + console.log("addLink" + JSON.stringify(link)) if (link.source && link.target) { this.force.stop(); this.cleanAll(); @@ -741,6 +740,7 @@ dreamer.GraphEditor = (function (global) { return 80 }) .type(function (d) { + console.log("popiup") return (self.get_d3_symbol()); }) ) @@ -948,7 +948,7 @@ dreamer.GraphEditor = (function (global) { if (self.lastKeyDown == SHIFT_BUTTON && self._selected_node != undefined) { var source_id = self._selected_node.id; var target_id = d.id; - log(JSON.stringify(self.filter_parameters.link.view)); + log("--" + JSON.stringify(self.filter_parameters.link.view)); var new_link = { source: source_id, target: target_id, @@ -1036,7 +1036,7 @@ dreamer.GraphEditor = (function (global) { */ GraphEditor.prototype.resizeSvg = function (width, height) { log("resizeSvg"); - log(event); + //log(event); this.width = width || this.width; this.height = height || this.height; this.svg.attr('width', width);