* Returns which resize corner the point is over, if any. * @param canvasX X position in canvas coordinates * @param canvasY Y position in canvas coordinates * @returns The compass corner the point is in, otherwise `undefined`.
(canvasX: number, canvasY: number)
| 1701 | * @returns The compass corner the point is in, otherwise `undefined`. |
| 1702 | */ |
| 1703 | findResizeDirection(canvasX: number, canvasY: number): CompassCorners | undefined { |
| 1704 | if (this.resizable === false) return |
| 1705 | |
| 1706 | const { boundingRect } = this |
| 1707 | if (!boundingRect.containsXy(canvasX, canvasY)) return |
| 1708 | |
| 1709 | // Check corners first (they take priority over edges) |
| 1710 | return boundingRect.findContainingCorner(canvasX, canvasY, LGraphNode.resizeHandleSize) |
| 1711 | } |
| 1712 | |
| 1713 | /** |
| 1714 | * returns all the info available about a property of this node. |
no test coverage detected