* Check if the specified rectangular area is empty (no nodes occupy any part of it). * * @param x the x coordinate (column) of the area to check * @param y the y coordinate (row) of the area to check * @param w the width in columns of the area to check * @param h the height in rows of
(x: number, y: number, w: number, h: number)
| 364 | * } |
| 365 | */ |
| 366 | public isAreaEmpty(x: number, y: number, w: number, h: number): boolean { |
| 367 | const nn: GridStackNode = {x: x || 0, y: y || 0, w: w || 1, h: h || 1}; |
| 368 | return !this.collide(nn); |
| 369 | } |
| 370 | |
| 371 | /** |
| 372 | * Re-layout grid items to reclaim any empty space. |