mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Add node IDs (#3788)
* update type * add id to new nodes * update paste/import behavior * update duplicate/copy * update duplicate workflow * update import functions + templates * add instance id on copy * on download add instance id * simplify for testing * update telemetry events * add ids to nodegraph * not if same instance * update spacing * fix tests * update tests * add uuid * fix tests update tests add uuid fix ts issue * fix telemetry event * update workflow import * update public api * add sqlit migration * on workflow update * add psql migration * add mysql migration * revert to title * fix telemetry bug * remove console log * remove migration logs * fix copy/paste bug * replace node index with node id * remove console log * address PR feedback * address comment * fix type issue * fix select * update schema * fix ts issue * update tel helpers * fix eslint issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="sticky-wrapper" :style="stickyPosition">
|
||||
<div class="sticky-wrapper" :style="stickyPosition" :id="nodeId">
|
||||
<div
|
||||
:class="{'sticky-default': true, 'touch-active': isTouchActive, 'is-touch-device': isTouchDevice}"
|
||||
:style="stickySize"
|
||||
@@ -18,7 +18,7 @@
|
||||
:height="node.parameters.height"
|
||||
:width="node.parameters.width"
|
||||
:scale="nodeViewScale"
|
||||
:id="nodeIndex"
|
||||
:id="node.id"
|
||||
:readOnly="isReadOnly"
|
||||
:defaultText="defaultText"
|
||||
:editMode="isActive && !isReadOnly"
|
||||
@@ -165,9 +165,9 @@ export default mixins(externalHooks, nodeBase, nodeHelpers, workflowHelpers).ext
|
||||
if (!this.isSelected && this.node) {
|
||||
this.$emit('nodeSelected', this.node.name, false, true);
|
||||
}
|
||||
const nodeIndex = this.$store.getters.getNodeIndex(this.data.name);
|
||||
const nodeIdName = `node-${nodeIndex}`;
|
||||
this.instance.destroyDraggable(nodeIdName); // todo
|
||||
if (this.node) {
|
||||
this.instance.destroyDraggable(this.node.id); // todo avoid destroying if possible
|
||||
}
|
||||
},
|
||||
onResize({height, width, dX, dY}: { width: number, height: number, dX: number, dY: number }) {
|
||||
if (!this.node) {
|
||||
|
||||
Reference in New Issue
Block a user