* Register TileLayout callbacks that should be called on various state changes. * @param contents Contains callbacks provided by the TileLayout component.
(contents: TileLayoutContents)
| 598 | * @param contents Contains callbacks provided by the TileLayout component. |
| 599 | */ |
| 600 | registerTileLayout(contents: TileLayoutContents) { |
| 601 | this.renderContent = contents.renderContent; |
| 602 | this.renderPreview = contents.renderPreview; |
| 603 | this.onNodeDelete = contents.onNodeDelete; |
| 604 | if (contents.gapSizePx !== undefined) { |
| 605 | this.setter(this.gapSizePx, contents.gapSizePx); |
| 606 | } |
| 607 | const tab = this.getter(this.tabAtom); |
| 608 | fireAndForget(() => BlockService.CleanupOrphanedBlocks(tab.oid)); |
| 609 | } |
| 610 | |
| 611 | /** |
| 612 | * Perform an action against the layout tree state. |
no test coverage detected