mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #2244 from kazuhitoyokoi/master-fixwiring4subflownode
Fix inserting new subflow node to existing wire
This commit is contained in:
commit
f3e1e8a2c7
@ -243,7 +243,6 @@ RED.palette = (function() {
|
|||||||
RED.sidebar.info.set(helpText,RED._("sidebar.info.nodeHelp"));
|
RED.sidebar.info.set(helpText,RED._("sidebar.info.nodeHelp"));
|
||||||
});
|
});
|
||||||
var chart = $("#chart");
|
var chart = $("#chart");
|
||||||
var chartOffset = chart.offset();
|
|
||||||
var chartSVG = $("#chart>svg").get(0);
|
var chartSVG = $("#chart>svg").get(0);
|
||||||
var activeSpliceLink;
|
var activeSpliceLink;
|
||||||
var mouseX;
|
var mouseX;
|
||||||
@ -267,8 +266,8 @@ RED.palette = (function() {
|
|||||||
ui.originalPosition.left = $('#' + e.target.id).offset().left;
|
ui.originalPosition.left = $('#' + e.target.id).offset().left;
|
||||||
|
|
||||||
if (def.inputs > 0 && def.outputs > 0) {
|
if (def.inputs > 0 && def.outputs > 0) {
|
||||||
mouseX = ui.position.left-paletteWidth+(ui.helper.width()/2) - chartOffset.left + chart.scrollLeft();
|
mouseX = ui.position.left - paletteWidth + (ui.helper.width()/2) + chart.scrollLeft();
|
||||||
mouseY = ui.position.top-paletteTop+(ui.helper.height()/2) - chartOffset.top + chart.scrollTop();
|
mouseY = ui.position.top - paletteTop + (ui.helper.height()/2) + chart.scrollTop();
|
||||||
if (!spliceTimer) {
|
if (!spliceTimer) {
|
||||||
spliceTimer = setTimeout(function() {
|
spliceTimer = setTimeout(function() {
|
||||||
var nodes = [];
|
var nodes = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user