mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 21:49:41 -08:00
fix types
This commit is contained in:
parent
198f9c02c3
commit
09c7dccc65
|
@ -42,7 +42,16 @@ declare module 'jsplumb' {
|
|||
targetNodeName: string,
|
||||
targetOutputIndex: number,
|
||||
};
|
||||
connector?: any;
|
||||
connector?: {
|
||||
setTargetPos: (pos: XYPosition) => void;
|
||||
resetTargetPos: () => void;
|
||||
bounds: {
|
||||
minX: number;
|
||||
maxX: number;
|
||||
minY: number;
|
||||
maxY: number;
|
||||
}
|
||||
};
|
||||
|
||||
// bind(event: string, (connection: Connection): void;): void; // tslint:disable-line:no-any
|
||||
bind(event: string, callback: Function): void;
|
||||
|
|
|
@ -241,7 +241,9 @@ export const showOrHideMidpointArrow = (connection: Connection) => {
|
|||
};
|
||||
|
||||
export const getConnectorLengths = (connection: Connection): [number, number] => {
|
||||
// @ts-ignore
|
||||
if (!connection.connector) {
|
||||
return [0, 0];
|
||||
}
|
||||
const bounds = connection.connector.bounds;
|
||||
const diffX = Math.abs(bounds.maxX - bounds.minX);
|
||||
const diffY = Math.abs(bounds.maxY - bounds.minY);
|
||||
|
|
Loading…
Reference in a new issue