From a95f60469a24ef283e2778fce707d9c4dcc4d1a0 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Wed, 14 Aug 2024 19:27:32 -0700 Subject: [PATCH] rename vars --- frontend/layout/lib/layoutModel.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/layout/lib/layoutModel.ts b/frontend/layout/lib/layoutModel.ts index d675f94d..672b6abf 100644 --- a/frontend/layout/lib/layoutModel.ts +++ b/frontend/layout/lib/layoutModel.ts @@ -525,8 +525,8 @@ export class LayoutModel { this.setter(this.isContainerResizing, false); }); - onResizeMove(resizeHandle: ResizeHandleProps, clientX: number, clientY: number) { - console.log("onResizeMove", resizeHandle, clientX, clientY, this.resizeContext); + onResizeMove(resizeHandle: ResizeHandleProps, x: number, y: number) { + console.log("onResizeMove", resizeHandle, x, y, this.resizeContext); const parentIsRow = resizeHandle.flexDirection === FlexDirection.Row; const parentNode = findNode(this.treeState.rootNode, resizeHandle.parentNodeId); const beforeNode = parentNode.children![resizeHandle.parentIndex]; @@ -553,10 +553,10 @@ export class LayoutModel { } const boundingRect = this.displayContainerRef.current?.getBoundingClientRect(); - clientX -= boundingRect?.top; - clientY -= boundingRect?.left; + x -= boundingRect?.top; + y -= boundingRect?.left; - const clientPoint = parentIsRow ? clientX : clientY; + const clientPoint = parentIsRow ? x : y; const clientDiff = (this.resizeContext.resizeHandleStartPx - clientPoint) * this.resizeContext.pixelToSizeRatio; const beforeNodeSize = this.resizeContext.beforeNodeStartSize - clientDiff; const afterNodeSize = this.resizeContext.afterNodeStartSize + clientDiff;