Remove node edge resize (#1066)

This commit is contained in:
filtered
2025-05-27 08:10:41 +10:00
committed by GitHub
parent e971667264
commit b86f2b58e6
6 changed files with 10 additions and 68 deletions

View File

@@ -203,13 +203,9 @@ interface ICreatePanelOptions {
}
const cursors = {
N: "ns-resize",
NE: "nesw-resize",
E: "ew-resize",
SE: "nwse-resize",
S: "ns-resize",
SW: "nesw-resize",
W: "ew-resize",
NW: "nwse-resize",
} as const
@@ -2380,34 +2376,20 @@ export class LGraphCanvas {
// Handle resize based on the direction
switch (resizeDirection) {
case "N": // North (top)
newBounds.y = startBounds.y + deltaY
newBounds.height = startBounds.height - deltaY
break
case "NE": // North-East (top-right)
newBounds.y = startBounds.y + deltaY
newBounds.width = startBounds.width + deltaX
newBounds.height = startBounds.height - deltaY
break
case "E": // East (right)
newBounds.width = startBounds.width + deltaX
break
case "SE": // South-East (bottom-right)
newBounds.width = startBounds.width + deltaX
newBounds.height = startBounds.height + deltaY
break
case "S": // South (bottom)
newBounds.height = startBounds.height + deltaY
break
case "SW": // South-West (bottom-left)
newBounds.x = startBounds.x + deltaX
newBounds.width = startBounds.width - deltaX
newBounds.height = startBounds.height + deltaY
break
case "W": // West (left)
newBounds.x = startBounds.x + deltaX
newBounds.width = startBounds.width - deltaX
break
case "NW": // North-West (top-left)
newBounds.x = startBounds.x + deltaX
newBounds.y = startBounds.y + deltaY