diff options
| author | Alon Levy <alon@pobox.com> | 2014-10-12 20:54:28 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-10-12 20:54:28 +0300 |
| commit | dc8b86b15cabde2614ccc9417b2dd9fd549c905b (patch) | |
| tree | 377161649fff47e5c10b155c8e5c9515828a4791 /scripts | |
| parent | 082d90e68a81f05c35f009bfdb2a8d131778af4b (diff) | |
#63 don't start force simulation when no topological change done
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rhizicore.js | 30 | ||||
| -rw-r--r-- | scripts/textanalysis-ui.js | 2 |
2 files changed, 14 insertions, 18 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index c2ce76ac..9db4c4ac 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -342,7 +342,7 @@ function myGraph(el) { var index = findNode(id, state); if ((index !== undefined)) { index.type = newtype; - update(); + update(true); } } @@ -350,7 +350,7 @@ function myGraph(el) { var index = findNode(id, state); if ((index === undefined)) return; index.url = url; - update(); + update(true); } this.editState = function(id, state, newstate) { @@ -532,7 +532,7 @@ function myGraph(el) { graph.addLink(link.source,link.target,link.name,"perm"); } graph.recenterZoom(); - graph.update(); + graph.update(false); graph.clear_history(); } this.load_from_json = load_from_json; @@ -743,7 +743,7 @@ function myGraph(el) { } else { graph.removeHighlight(); } - graph.update(); + graph.update(true); }); //if(graphstate==="GANTT"){ @@ -798,7 +798,7 @@ function myGraph(el) { } } - update(); + update(false); } @@ -999,22 +999,21 @@ function showInfo(d, i) { } graph.editType(d.id,d.type,$('#edittype').val()); graph.editURL(d.id, d.type, $('#editurl').val()); - graph.update(); + graph.update(true); return false; }); $("#deletenode").click(function() { if (confirm('This node and all its connections will be deleted, are you sure?')) { graph.removeNode(d.id, null); + graph.update(false); } - - graph.update(); }); } else { graph.removeHighlight(); $('.info').fadeOut(300); } - graph.update(); + graph.update(true); } function mousedown() { @@ -1024,7 +1023,7 @@ function mousedown() { $('.editlinkinfo').css('left', 0); graph.removeHighlight(); $('.info').fadeOut(300); - graph.update(); + graph.update(true); } function AddedUnique(newnode) { @@ -1054,16 +1053,14 @@ function editNode(d, i) { $('.editinfo').css('left', 0); graph.editName(oldname, "xx", $('#editname').val()); - - graph.update(); + graph.update(true); return false; } }); - graph.update(); - + graph.update(true); } function editLink(d, i) { @@ -1079,13 +1076,12 @@ function editLink(d, i) { graph.editLink(d.source.id, d.target.id, $('#editlinkname').val()); $('.editlinkinfo').css('top', -100); $('.editlinkinfo').css('left', 0); - graph.update(); + graph.update(true); return false; }); - graph.update(); - + graph.update(true); } diff --git a/scripts/textanalysis-ui.js b/scripts/textanalysis-ui.js index d79ceb0a..d3f0f723 100644 --- a/scripts/textanalysis-ui.js +++ b/scripts/textanalysis-ui.js @@ -122,7 +122,7 @@ function changeType(arg, id) { $('.typeselection').html('<table><tr><td style="height:28px"></td></tr><tr><td>' + "Chosen Type: " + nodetypes[typeindex] + '</td></tr></table>'); graph.findCoordinates(lastnode,null); } - graph.updateGraph(); + graph.update(true); } if (element.length == 1) { |
