From dddfb1ec08fdfb0eaeb6b24b9309bbfd490b28d9 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Thu, 26 Sep 2019 11:43:24 +0900 Subject: [PATCH] Fix node draggable handling --- .../node_modules/@node-red/editor-client/src/js/ui/palette.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js index 6b0f441e0..d2ef971b3 100755 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js @@ -298,7 +298,8 @@ RED.palette = (function() { }, stop: function() { d3.select('.red-ui-flow-link-splice').classed('red-ui-flow-link-splice',false); if (spliceTimer) { clearTimeout(spliceTimer); spliceTimer = null;}}, drag: function(e,ui) { - ui.originalPosition.left = $('#' + e.target.id).offset().left; + var paletteNode = getPaletteNode(nt); + ui.originalPosition.left = paletteNode.offset().left; if (def.inputs > 0 && def.outputs > 0) { mouseX = ui.position.left - paletteWidth + (ui.helper.width()/2) + chart.scrollLeft();