mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix the canvas node distance when automatically injecting manual trigger (#5716)
fix(editor): Fix the canvas node distance when automatically adding manual trigger
This commit is contained in:
parent
6916628a9f
commit
cb2ba97f38
|
@ -1682,7 +1682,7 @@ export default mixins(
|
||||||
// If adding more than one node, offset the X position
|
// If adding more than one node, offset the X position
|
||||||
mousePosition[0] -
|
mousePosition[0] -
|
||||||
NodeViewUtils.NODE_SIZE / 2 +
|
NodeViewUtils.NODE_SIZE / 2 +
|
||||||
NodeViewUtils.NODE_SIZE * (index * 2),
|
NodeViewUtils.NODE_SIZE * (index * 2 + NodeViewUtils.GRID_SIZE),
|
||||||
mousePosition[1] - NodeViewUtils.NODE_SIZE / 2,
|
mousePosition[1] - NodeViewUtils.NODE_SIZE / 2,
|
||||||
] as XYPosition,
|
] as XYPosition,
|
||||||
dragAndDrop: true,
|
dragAndDrop: true,
|
||||||
|
@ -3794,7 +3794,9 @@ export default mixins(
|
||||||
|
|
||||||
// Position the added node to the right side of the previously added one
|
// Position the added node to the right side of the previously added one
|
||||||
lastAddedNode.position = [
|
lastAddedNode.position = [
|
||||||
previouslyAddedNode.position[0] + NodeViewUtils.NODE_SIZE * 2,
|
previouslyAddedNode.position[0] +
|
||||||
|
NodeViewUtils.NODE_SIZE * 2 +
|
||||||
|
NodeViewUtils.GRID_SIZE,
|
||||||
previouslyAddedNode.position[1],
|
previouslyAddedNode.position[1],
|
||||||
];
|
];
|
||||||
actionWatcher();
|
actionWatcher();
|
||||||
|
|
Loading…
Reference in a new issue