From 69d5ffe1edb30d6d133c2c97b996635a26f69029 Mon Sep 17 00:00:00 2001 From: sakazuki Date: Sat, 2 Nov 2019 13:52:58 +0900 Subject: [PATCH] adjust source position of link to draw --- .../node_modules/@node-red/editor-client/src/js/ui/view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index 274bf3540..460d50a08 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -870,7 +870,7 @@ RED.view = (function() { } var sc = (quickAddLink.portType === PORT_TYPE_OUTPUT)?1:-1; if (vertical) { - quickAddLink.el.attr("d",generateLinkPathV(quickAddLink.node.x+portX+sc*quickAddLink.node.w/2,quickAddLink.node.y,point[0]-sc*node_width/2,point[1],sc)); + quickAddLink.el.attr("d",generateLinkPathV(quickAddLink.node.x+portX,quickAddLink.node.y+sc*quickAddLink.node.h/2,point[0]-sc*node_width/2,point[1],sc)); }else{ quickAddLink.el.attr("d",generateLinkPath(quickAddLink.node.x+sc*quickAddLink.node.w/2,quickAddLink.node.y+portY,point[0]-sc*node_width/2,point[1],sc)); } @@ -1235,7 +1235,7 @@ RED.view = (function() { var sc = (drag_line.portType === PORT_TYPE_OUTPUT)?1:-1; if (vertical) { - drag_line.el.attr("d",generateLinkPathV(drag_line.node.x+portX,drag_line.node.y,mousePos[0],mousePos[1],sc)); + drag_line.el.attr("d",generateLinkPathV(drag_line.node.x+portX,drag_line.node.y+sc*drag_line.node.h/2,mousePos[0],mousePos[1],sc)); }else{ drag_line.el.attr("d",generateLinkPath(drag_line.node.x+sc*drag_line.node.w/2,drag_line.node.y+portY,mousePos[0],mousePos[1],sc)); }