| 468 | } |
| 469 | |
| 470 | dimensions () { |
| 471 | let width = 0 |
| 472 | let height = 0 |
| 473 | for (const thang of Array.from(this.get('thangs') || [])) { |
| 474 | for (const component of Array.from(thang.components)) { |
| 475 | const c = component.config |
| 476 | if (c == null) { continue } |
| 477 | if ((c.width != null) && (c.width > width)) { |
| 478 | ({ |
| 479 | width, |
| 480 | } = c) |
| 481 | } |
| 482 | if ((c.height != null) && (c.height > height)) { |
| 483 | ({ |
| 484 | height, |
| 485 | } = c) |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | return { width, height } |
| 490 | } |
| 491 | |
| 492 | isLadder () { return Level.isLadder(this.attributes) } |
| 493 | |