1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #1156 from LinusU/patch-1

Use pre-calculated values for connection path
This commit is contained in:
Nick O'Leary 2017-02-28 10:10:12 +00:00 committed by GitHub
commit 16c92cc739

View File

@ -2227,10 +2227,10 @@ RED.view = (function() {
d.x2 = d.target.x-d.target.w/2; d.x2 = d.target.x-d.target.w/2;
d.y2 = d.target.y; d.y2 = d.target.y;
return "M "+(d.source.x+d.source.w/2)+" "+(d.source.y+y)+ return "M "+d.x1+" "+d.y1+
" C "+(d.source.x+d.source.w/2+scale*node_width)+" "+(d.source.y+y+scaleY*node_height)+" "+ " C "+(d.x1+scale*node_width)+" "+(d.y1+scaleY*node_height)+" "+
(d.target.x-d.target.w/2-scale*node_width)+" "+(d.target.y-scaleY*node_height)+" "+ (d.x2-scale*node_width)+" "+(d.y2-scaleY*node_height)+" "+
(d.target.x-d.target.w/2)+" "+d.target.y; d.x2+" "+d.y2;
}); });
} }
}) })