* Calculate the total area of a grid position. * * @param a position with width and height * @returns the total area (width * height) * * @example * const area = Utils.area({x: 0, y: 0, w: 3, h: 2}); // returns 6
(a: GridStackPosition)
| 295 | * const area = Utils.area({x: 0, y: 0, w: 3, h: 2}); // returns 6 |
| 296 | */ |
| 297 | static area(a: GridStackPosition): number { |
| 298 | return a.w * a.h; |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * Sort an array of grid nodes by position (y first, then x). |
no outgoing calls
no test coverage detected