From 37dd075309ef8709d90e90615d1049130ef25300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Thu, 16 Feb 2017 18:05:59 +0100 Subject: [PATCH] Use pre-calculated values for connection path --- editor/js/ui/view.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/js/ui/view.js b/editor/js/ui/view.js index 346d53509..56e616feb 100644 --- a/editor/js/ui/view.js +++ b/editor/js/ui/view.js @@ -2227,10 +2227,10 @@ RED.view = (function() { d.x2 = d.target.x-d.target.w/2; d.y2 = d.target.y; - return "M "+(d.source.x+d.source.w/2)+" "+(d.source.y+y)+ - " C "+(d.source.x+d.source.w/2+scale*node_width)+" "+(d.source.y+y+scaleY*node_height)+" "+ - (d.target.x-d.target.w/2-scale*node_width)+" "+(d.target.y-scaleY*node_height)+" "+ - (d.target.x-d.target.w/2)+" "+d.target.y; + return "M "+d.x1+" "+d.y1+ + " C "+(d.x1+scale*node_width)+" "+(d.y1+scaleY*node_height)+" "+ + (d.x2-scale*node_width)+" "+(d.y2-scaleY*node_height)+" "+ + d.x2+" "+d.y2; }); } })