Improve node locations

This commit is contained in:
Jan Oberhauser 2019-08-01 08:26:43 +02:00
parent d0289e88b3
commit 6672a62a62

View file

@ -830,7 +830,7 @@ export default mixins(
newPosition = newPosition.slice(); newPosition = newPosition.slice();
if (!movePosition) { if (!movePosition) {
movePosition = [35, 35]; movePosition = [50, 50];
} }
let conflictFound = false; let conflictFound = false;
@ -933,8 +933,8 @@ export default mixins(
// If a node is active then add the new node directly after the current one // If a node is active then add the new node directly after the current one
// newNodeData.position = [activeNode.position[0], activeNode.position[1] + 60]; // newNodeData.position = [activeNode.position[0], activeNode.position[1] + 60];
newNodeData.position = this.getNewNodePosition( newNodeData.position = this.getNewNodePosition(
[lastSelectedNode.position[0] + 180, lastSelectedNode.position[1]], [lastSelectedNode.position[0] + 150, lastSelectedNode.position[1]],
[110, 0] [100, 0]
); );
} else { } else {
// If no node is active find a free spot // If no node is active find a free spot
@ -1236,7 +1236,7 @@ export default mixins(
type: 'n8n-nodes-base.start', type: 'n8n-nodes-base.start',
typeVersion: 1, typeVersion: 1,
position: [ position: [
100, 250,
300, 300,
] as XYPositon, ] as XYPositon,
parameters: {}, parameters: {},