Skip to content

Commit 4e66b26

Browse files
committed
remove trailing space error
1 parent 4962e05 commit 4e66b26

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/graph-builder/graph-core/1-core.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ class CoreGraph {
8484
// HARD ENFORCEMENT: Snap width every frame during resize
8585
const snappedWidth = this.snapDimensionToGrid(width);
8686
node.data('style', { ...node.data('style'), width: snappedWidth });
87-
87+
8888
// Adjust position to maintain edge alignment based on resize handle
8989
const resizeType = node.scratch('resizeType');
9090
if (resizeType && (resizeType.includes('left') || resizeType.includes('right'))) {
9191
const currentPos = node.position();
9292
const initialPos = node.scratch('resizeInitialPos');
9393
const initialWidth = node.scratch('width');
9494
const widthDelta = snappedWidth - initialWidth;
95-
95+
9696
let newX = currentPos.x;
9797
if (resizeType.includes('left')) {
9898
newX = initialPos.x - widthDelta / 2;
@@ -107,15 +107,15 @@ class CoreGraph {
107107
// HARD ENFORCEMENT: Snap height every frame during resize
108108
const snappedHeight = this.snapDimensionToGrid(height);
109109
node.data('style', { ...node.data('style'), height: snappedHeight });
110-
110+
111111
// Adjust position to maintain edge alignment based on resize handle
112112
const resizeType = node.scratch('resizeType');
113113
if (resizeType && (resizeType.includes('top') || resizeType.includes('bottom'))) {
114114
const currentPos = node.position();
115115
const initialPos = node.scratch('resizeInitialPos');
116116
const initialHeight = node.scratch('height');
117117
const heightDelta = snappedHeight - initialHeight;
118-
118+
119119
let newY = currentPos.y;
120120
if (resizeType.includes('top')) {
121121
newY = initialPos.y - heightDelta / 2;
@@ -260,13 +260,13 @@ class CoreGraph {
260260
// Clean up scratch data
261261
node.removeScratch('resizeType');
262262
node.removeScratch('resizeInitialPos');
263-
263+
264264
// Final enforcement: ensure position and dimensions are grid-aligned
265265
const style = node.data('style') || {};
266266
const snappedWidth = this.snapDimensionToGrid(style.width || 100);
267267
const snappedHeight = this.snapDimensionToGrid(style.height || 50);
268268
node.data('style', { ...style, width: snappedWidth, height: snappedHeight });
269-
269+
270270
const snappedPos = this.snapPositionToGrid(node.position());
271271
node.position(snappedPos);
272272
});

0 commit comments

Comments
 (0)