-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
N8n 2349 workflow canvas revamp #2388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hints
], | ||
methods: { | ||
__addNode (node: INodeUi) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor this giant function into three distinct functions..
isSource: false, | ||
isTarget: !this.isReadOnly, | ||
parameters: { | ||
nodeIndex: this.nodeIndex, | ||
type: inputName, | ||
index, | ||
}, | ||
dragAllowedWhenFull: inputData.dragAllowedWhenFull, | ||
enabled: !this.isReadOnly, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes bug where you can pull connections in executions FROM INPUTS
isTarget: false, | ||
enabled: !this.isReadOnly, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes bug where you can pull connections in executions from inputs
<div :class="{'node-wrapper': true, selected: isSelected}" :style="nodePosition"> | ||
<div class="select-background" v-show="isSelected"></div> | ||
<div :class="{'node-default': true, 'touch-active': isTouchActive, 'is-touch-device': isTouchDevice}" :data-name="data.name" :ref="data.name"> | ||
<div :class="nodeClass" :style="nodeStyle" @dblclick="setNodeActive" @click.left="mouseLeftClick" v-touch:start="touchStart" v-touch:end="touchEnd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a wrapper to keep options hoverable within node box but also have different z-index...
} catch (e) { | ||
console.error(e); // eslint-disable-line no-console | ||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why wrap all binds with try/catch? because jsplumb has try /catch at bind level but it removes details.. this makes it easier to pin down errors
/** | ||
* Custom connector type | ||
* Based on jsplumb Flowchart and Bezier types | ||
* | ||
* https://github.com/jsplumb/jsplumb | ||
* https://github.com/jsplumb/jsplumb/blob/fb5fce52794fa52306825bdaa62bf3855cdfd7e0/src/connectors-flowchart.js | ||
* https://github.com/jsplumb/jsplumb/blob/fb5fce52794fa52306825bdaa62bf3855cdfd7e0/src/connectors-bezier.js | ||
* | ||
* Dual licensed under the MIT and GPL2 licenses. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for legal reasons, checking with Jan on this
this.overrideTargetEndpoint = null; | ||
}; | ||
|
||
this._compute = function (originalPaintInfo, params) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entry point for drawing connectors
if (diffX < (-1 * loopbackMinimum)) { | ||
// loop backward behavior | ||
midy = paintInfo.startStubY - (diffX < 0 ? direction * loopbackVerticalLength : 0); | ||
} else { | ||
// original flowchart behavior | ||
midy = paintInfo.startStubY + ((paintInfo.endStubY - paintInfo.startStubY) * midpoint); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorcery by which loops happen
} | ||
}; | ||
|
||
const lineCalculators = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed other types of flows... when endpoints are perpendicular or orthogonal... to avoid lots of dead code.. can add them back if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing work 🚀
just some smaller suggestions 😊
Amazing work. Got merged. Thanks a lot! |
Got released with |
No description provided.