mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-19 21:11:32 +01:00
rename vars
This commit is contained in:
parent
fb1c3ac85f
commit
a95f60469a
@ -525,8 +525,8 @@ export class LayoutModel {
|
|||||||
this.setter(this.isContainerResizing, false);
|
this.setter(this.isContainerResizing, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
onResizeMove(resizeHandle: ResizeHandleProps, clientX: number, clientY: number) {
|
onResizeMove(resizeHandle: ResizeHandleProps, x: number, y: number) {
|
||||||
console.log("onResizeMove", resizeHandle, clientX, clientY, this.resizeContext);
|
console.log("onResizeMove", resizeHandle, x, y, this.resizeContext);
|
||||||
const parentIsRow = resizeHandle.flexDirection === FlexDirection.Row;
|
const parentIsRow = resizeHandle.flexDirection === FlexDirection.Row;
|
||||||
const parentNode = findNode(this.treeState.rootNode, resizeHandle.parentNodeId);
|
const parentNode = findNode(this.treeState.rootNode, resizeHandle.parentNodeId);
|
||||||
const beforeNode = parentNode.children![resizeHandle.parentIndex];
|
const beforeNode = parentNode.children![resizeHandle.parentIndex];
|
||||||
@ -553,10 +553,10 @@ export class LayoutModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const boundingRect = this.displayContainerRef.current?.getBoundingClientRect();
|
const boundingRect = this.displayContainerRef.current?.getBoundingClientRect();
|
||||||
clientX -= boundingRect?.top;
|
x -= boundingRect?.top;
|
||||||
clientY -= boundingRect?.left;
|
y -= boundingRect?.left;
|
||||||
|
|
||||||
const clientPoint = parentIsRow ? clientX : clientY;
|
const clientPoint = parentIsRow ? x : y;
|
||||||
const clientDiff = (this.resizeContext.resizeHandleStartPx - clientPoint) * this.resizeContext.pixelToSizeRatio;
|
const clientDiff = (this.resizeContext.resizeHandleStartPx - clientPoint) * this.resizeContext.pixelToSizeRatio;
|
||||||
const beforeNodeSize = this.resizeContext.beforeNodeStartSize - clientDiff;
|
const beforeNodeSize = this.resizeContext.beforeNodeStartSize - clientDiff;
|
||||||
const afterNodeSize = this.resizeContext.afterNodeStartSize + clientDiff;
|
const afterNodeSize = this.resizeContext.afterNodeStartSize + clientDiff;
|
||||||
|
Loading…
Reference in New Issue
Block a user