diff options
author | Adhitya Kamakshidasan | 2016-07-04 15:01:10 +0530 |
---|---|---|
committer | GitHub | 2016-07-04 15:01:10 +0530 |
commit | b5aceea07ae0f08c95ffe70f1e6462bf492d9f39 (patch) | |
tree | 06daca15840f17b0600f8e33e48e6ca40acfc88d | |
parent | ebcbdbcf50fd0162e1dd60ba2a2c93a40823380e (diff) | |
parent | c2bdac21ee2bde5afce42a8659ab766c408a8fe7 (diff) | |
download | xcos-on-web-b5aceea07ae0f08c95ffe70f1e6462bf492d9f39.tar.gz xcos-on-web-b5aceea07ae0f08c95ffe70f1e6462bf492d9f39.tar.bz2 xcos-on-web-b5aceea07ae0f08c95ffe70f1e6462bf492d9f39.zip |
Merge pull request #119 from jiteshjha/fixes-wire-bug
Fixes wire bug
-rw-r--r-- | index.html | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -34,11 +34,7 @@ // Enables guides mxGraphHandler.prototype.guidesEnabled = true; - - //Adhitya: @Jitesh: Please test this more! - // Display vertices over edges - //mxGraph.prototype.ordered = false; - + // Alt disables guides mxGuide.prototype.isEnabledForEvent = function(evt) { return !mxEvent.isAltDown(evt); @@ -386,7 +382,7 @@ * If there are any waypoints, divide them for the two newly created edges. * The two newly created edges are inherited from the source edge */ - if(waypoints != null) { + if(waypoints != null) { var waypoints1 = []; for(var i = 0; i < seg; i++) { waypoints1.push(waypoints[i]); @@ -404,7 +400,8 @@ // Find the waypoints of the current edge, and set the waypoints for the new thirdEdge var waypoints3 = edgeState.absolutePoints; if(waypoints3 != null && waypoints3.length > 1) { - waypoints3.shift(); + // Remove last absolute point + waypoints3.pop(); } thirdEdge.geometry.points = waypoints3; @@ -1048,7 +1045,7 @@ editor.addAction('simulate', function (editor, cell) { var diagram = getXcosDiagram(editor, cell); - + var blob = new Blob([diagram], {type: 'text/plain'}); var xhr = new XMLHttpRequest(); xhr.open('POST','ScilabServlet', true); @@ -1067,11 +1064,11 @@ paragraph.innerHTML = xhr.responseText; content.appendChild(paragraph); - + //var img = document.createElement("img"); //img.src = "data:image/;base64,"+xhr.responseText; //content.appendChild(img); - + var wind = showModalWindow(graph, 'Properties', content, 1000, 1000); }; xhr.onreadystatechange = function(){ |