fixed curvature of edges between old and new state

This commit is contained in:
David Mosbach 2023-05-30 22:30:52 +02:00
parent 59541275c2
commit f2a5b858ad
2 changed files with 9 additions and 4 deletions

View File

@ -72,8 +72,8 @@
</div> </div>
<h1 id="sideheading">Hello</h1> <h1 id="sideheading">Hello</h1>
<svg class="close" height="15" width="15" xmlns="http://www.w3.org/2000/svg" onclick="deselect()"> <svg class="close" height="15" width="15" xmlns="http://www.w3.org/2000/svg" onclick="deselect()">
<polyline points="1,1 14,14" style="fill:none;stroke:rgb(183, 76, 76);stroke-width:2" stroke-linecap="round" /> <polyline points="1,1 14,14" style="fill:none;stroke:rgb(120, 120, 120);stroke-width:2" stroke-linecap="round" />
<polyline points="14,1 1,14" style="fill:none;stroke:rgb(183, 76, 76);stroke-width:2" stroke-linecap="round" /> <polyline points="14,1 1,14" style="fill:none;stroke:rgb(120, 120, 120);stroke-width:2" stroke-linecap="round" />
X X
</svg> </svg>
</div> </div>
@ -87,10 +87,15 @@
<div id="filepanel"> <!--Pop-up panel covering the center of the screen for file interactions--> <div id="filepanel"> <!--Pop-up panel covering the center of the screen for file interactions-->
<div id="fileheader"> <div id="fileheader">
<h2 id="fileheading">Hello</h2> <h2 id="fileheading">Hello</h2>
<svg class="close" height="15" width="15" xmlns="http://www.w3.org/2000/svg" onclick="closeFileDisplay()">
<polyline points="1,1 14,14" style="fill:none;stroke:rgb(120, 120, 120);stroke-width:2" stroke-linecap="round" />
<polyline points="14,1 1,14" style="fill:none;stroke:rgb(120, 120, 120);stroke-width:2" stroke-linecap="round" />
X
</svg>
</div> </div>
<div id="filecontent"></div> <div id="filecontent"></div>
<div id="filebuttons"> <div id="filebuttons">
<button type="submit">Load</button> <!-- <button type="submit">Load</button> -->
<button type="reset" onclick="closeFileDisplay()">Cancel</button> <button type="reset" onclick="closeFileDisplay()">Cancel</button>
</div> </div>
</div> </div>

View File

@ -299,7 +299,7 @@ function addState() {
var nodeId = stateIdCounter ++; var nodeId = stateIdCounter ++;
var x = newStateCoords.x; var x = newStateCoords.x;
var y = newStateCoords.y; var y = newStateCoords.y;
state = {id: nodeId, x: x, y: y, name: 'state_' + nodeId, fx: x, fy: y, val: 5}; state = {id: 'state_' + nodeId, x: x, y: y, name: 'state_' + nodeId, fx: x, fy: y, val: 5};
workflow.states.push(state); workflow.states.push(state);
updateGraph(); updateGraph();
select(state); select(state);