mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-31 23:47:28 -08:00
add pushing nodes length
This commit is contained in:
parent
d5b14b2bdf
commit
0dcd8a23a5
|
@ -188,6 +188,36 @@ const DEFAULT_START_NODE = {
|
||||||
parameters: {},
|
parameters: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!window.localStorage.getItem('CURVINESS')) {
|
||||||
|
window.localStorage.setItem('CURVINESS', '150');
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
const _CURVINESS = parseInt(window.localStorage.getItem('CURVINESS'), 10);
|
||||||
|
|
||||||
|
if (!window.localStorage.getItem('OUTLINE_STROKE_COLOR')) {
|
||||||
|
window.localStorage.setItem('OUTLINE_STROKE_COLOR', 'transparent');
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
const _OUTLINE_STROKE_COLOR = window.localStorage.getItem('OUTLINE_STROKE_COLOR');
|
||||||
|
|
||||||
|
if (!window.localStorage.getItem('OUTLINE_STROKE_WIDTH')) {
|
||||||
|
window.localStorage.setItem('OUTLINE_STROKE_WIDTH', '12');
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
const _OUTLINE_STROKE_WIDTH = parseInt(window.localStorage.getItem('OUTLINE_STROKE_WIDTH'), 10);
|
||||||
|
|
||||||
|
if (!window.localStorage.getItem('ALWAYS_RESPECT_STUB')) {
|
||||||
|
window.localStorage.setItem('ALWAYS_RESPECT_STUB', 'false');
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
const _ALWAYS_RESPECT_STUB = window.localStorage.getItem('ALWAYS_RESPECT_STUB') === 'true';
|
||||||
|
|
||||||
|
if (!window.localStorage.getItem('PUSH_NODES_LENGTH')) {
|
||||||
|
window.localStorage.setItem('PUSH_NODES_LENGTH', 'false');
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
const _PUSH_NODES_LENGTH = parseInt(window.localStorage.getItem('PUSH_NODES_LENGTH'), 200);
|
||||||
|
|
||||||
export default mixins(
|
export default mixins(
|
||||||
copyPaste,
|
copyPaste,
|
||||||
externalHooks,
|
externalHooks,
|
||||||
|
@ -1200,7 +1230,7 @@ export default mixins(
|
||||||
const lastSelectedNode = this.lastSelectedNode;
|
const lastSelectedNode = this.lastSelectedNode;
|
||||||
const lastSelectedNodeOutputIndex = this.$store.getters.lastSelectedNodeOutputIndex;
|
const lastSelectedNodeOutputIndex = this.$store.getters.lastSelectedNodeOutputIndex;
|
||||||
if (lastSelectedNode) {
|
if (lastSelectedNode) {
|
||||||
this.pushDownstreamNodes(200);
|
this.pushDownstreamNodes(_PUSH_NODES_LENGTH);
|
||||||
// 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 = getNewNodePosition(
|
newNodeData.position = getNewNodePosition(
|
||||||
|
@ -1295,30 +1325,6 @@ export default mixins(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initNodeView () {
|
initNodeView () {
|
||||||
if (!window.localStorage.getItem('CURVINESS')) {
|
|
||||||
window.localStorage.setItem('CURVINESS', '150');
|
|
||||||
}
|
|
||||||
// @ts-ignore
|
|
||||||
const _CURVINESS = parseInt(window.localStorage.getItem('CURVINESS'), 10);
|
|
||||||
|
|
||||||
if (!window.localStorage.getItem('OUTLINE_STROKE_COLOR')) {
|
|
||||||
window.localStorage.setItem('OUTLINE_STROKE_COLOR', 'transparent');
|
|
||||||
}
|
|
||||||
// @ts-ignore
|
|
||||||
const _OUTLINE_STROKE_COLOR = window.localStorage.getItem('OUTLINE_STROKE_COLOR');
|
|
||||||
|
|
||||||
if (!window.localStorage.getItem('OUTLINE_STROKE_WIDTH')) {
|
|
||||||
window.localStorage.setItem('OUTLINE_STROKE_WIDTH', '12');
|
|
||||||
}
|
|
||||||
// @ts-ignore
|
|
||||||
const _OUTLINE_STROKE_WIDTH = parseInt(window.localStorage.getItem('OUTLINE_STROKE_WIDTH'), 10);
|
|
||||||
|
|
||||||
if (!window.localStorage.getItem('ALWAYS_RESPECT_STUB')) {
|
|
||||||
window.localStorage.setItem('ALWAYS_RESPECT_STUB', 'false');
|
|
||||||
}
|
|
||||||
// @ts-ignore
|
|
||||||
const _ALWAYS_RESPECT_STUB = window.localStorage.getItem('ALWAYS_RESPECT_STUB') === 'true';
|
|
||||||
|
|
||||||
this.instance.importDefaults({
|
this.instance.importDefaults({
|
||||||
Connector: ['Bezier', { curviness: _CURVINESS }],
|
Connector: ['Bezier', { curviness: _CURVINESS }],
|
||||||
Endpoint: ['Dot', { radius: 5 }],
|
Endpoint: ['Dot', { radius: 5 }],
|
||||||
|
|
Loading…
Reference in a new issue