mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
b904c23e4d
commit
7a4f48e4fb
@ -46,7 +46,9 @@ RED.subflow = (function() {
|
||||
'</script>';
|
||||
|
||||
function findAvailableSubflowIOPosition(subflow,isInput) {
|
||||
var pos = {x:50,y:30};
|
||||
const scrollPos = RED.view.scroll()
|
||||
const scaleFactor = RED.view.scale()
|
||||
var pos = { x: (scrollPos[0]/scaleFactor)+50, y: (scrollPos[1]/scaleFactor)+30 };
|
||||
if (!isInput) {
|
||||
pos.x += 110;
|
||||
}
|
||||
|
@ -4359,6 +4359,7 @@ RED.view = (function() {
|
||||
this.__port__.setAttribute("transform","translate(-5,"+((d.h/2)-5)+")");
|
||||
this.__outputOutput__.setAttribute("transform","translate(20,"+((d.h/2)-8)+")");
|
||||
this.__outputNumber__.setAttribute("transform","translate(20,"+((d.h/2)+7)+")");
|
||||
this.__outputNumber__.textContent = d.i+1;
|
||||
}
|
||||
d.dirty = false;
|
||||
}
|
||||
@ -6282,8 +6283,12 @@ RED.view = (function() {
|
||||
})
|
||||
},
|
||||
scroll: function(x,y) {
|
||||
chart.scrollLeft(chart.scrollLeft()+x);
|
||||
chart.scrollTop(chart.scrollTop()+y)
|
||||
if (x !== undefined && y !== undefined) {
|
||||
chart.scrollLeft(chart.scrollLeft()+x);
|
||||
chart.scrollTop(chart.scrollTop()+y)
|
||||
} else {
|
||||
return [chart.scrollLeft(), chart.scrollTop()]
|
||||
}
|
||||
},
|
||||
clickNodeButton: function(n) {
|
||||
if (n._def.button) {
|
||||
|
Loading…
Reference in New Issue
Block a user