* Subscribe to selection state changes. Fires whenever the selection * is started, updated, cleared, or copied. Returns an unsubscribe fn.
(cb: () => void)
| 1242 | * is started, updated, cleared, or copied. Returns an unsubscribe fn. |
| 1243 | */ |
| 1244 | subscribeToSelectionChange(cb: () => void): () => void { |
| 1245 | this.selectionListeners.add(cb); |
| 1246 | return () => this.selectionListeners.delete(cb); |
| 1247 | } |
| 1248 | private notifySelectionChange(): void { |
| 1249 | this.onRender(); |
| 1250 | for (const cb of this.selectionListeners) cb(); |
no test coverage detected