mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Fix sticky duplication and position bug (#3755)
* fix bug when inserting sticky * center sticky on insert * export as const
This commit is contained in:
@@ -474,6 +474,10 @@ export const getRelativePosition = (x: number, y: number, scale: number, offset:
|
||||
];
|
||||
};
|
||||
|
||||
export const getMidCanvasPosition = (scale: number, offset: XYPosition): XYPosition => {
|
||||
return getRelativePosition((window.innerWidth - SIDEBAR_WIDTH) / 2, (window.innerHeight - HEADER_HEIGHT) / 2, scale, offset);
|
||||
};
|
||||
|
||||
export const getBackgroundStyles = (scale: number, offsetPosition: XYPosition) => {
|
||||
const squareSize = GRID_SIZE * scale;
|
||||
const dotSize = 1 * scale;
|
||||
|
||||
Reference in New Issue
Block a user