mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
reset conn after pull
This commit is contained in:
parent
61b9584266
commit
198f9c02c3
|
@ -42,6 +42,7 @@ declare module 'jsplumb' {
|
|||
targetNodeName: string,
|
||||
targetOutputIndex: number,
|
||||
};
|
||||
connector?: any;
|
||||
|
||||
// bind(event: string, (connection: Connection): void;): void; // tslint:disable-line:no-any
|
||||
bind(event: string, callback: Function): void;
|
||||
|
|
|
@ -1522,6 +1522,7 @@ export default mixins(
|
|||
const onMouseUp = (e: MouseEvent) => {
|
||||
this.pullConnActive = false;
|
||||
this.newNodeInsertPosition = this.getMousePositionWithinNodeView(e);
|
||||
CanvasHelpers.resetConnectionAfterPull(connection);
|
||||
window.removeEventListener('mousemove', onMouseMove);
|
||||
window.removeEventListener('mouseup', onMouseUp);
|
||||
};
|
||||
|
|
|
@ -540,15 +540,26 @@ export const getUniqueNodeName = (nodes: INodeUi[], originalName: string, additi
|
|||
};
|
||||
|
||||
export const showDropConnectionState = (connection: Connection, targetPos: XYPosition) => {
|
||||
if (connection && connection.connector) {
|
||||
connection.connector.setTargetPos(targetPos);
|
||||
connection.setPaintStyle(CONNECTOR_PAINT_STYLE_PRIMARY);
|
||||
hideOverlay(connection, OVERLAY_DROP_NODE_ID);
|
||||
}
|
||||
};
|
||||
|
||||
export const showPullConnectionState = (connection: Connection) => {
|
||||
if (connection && connection.connector) {
|
||||
connection.connector.resetTargetPos();
|
||||
connection.setPaintStyle(CONNECTOR_PAINT_STYLE_DEFAULT);
|
||||
showOverlay(connection, OVERLAY_DROP_NODE_ID);
|
||||
}
|
||||
};
|
||||
|
||||
export const resetConnectionAfterPull = (connection: Connection) => {
|
||||
if (connection && connection.connector) {
|
||||
connection.connector.resetTargetPos();
|
||||
connection.setPaintStyle(CONNECTOR_PAINT_STYLE_DEFAULT);
|
||||
}
|
||||
};
|
||||
|
||||
export const resetInputLabelPosition = (targetEndpoint: Endpoint) => {
|
||||
|
|
Loading…
Reference in a new issue