Classes
Import these from @grafloria/renderer.
Classes
DiagramOutlineView
tsclass DiagramOutlineView
Methods
constructor(container: HTMLElement, options: OutlineViewOptions = {})getElement(): HTMLElement— The hidden region, for tests and hosts that want to relocate it.getRebuildCount(): number— How many times the DOM has actually been rebuilt. The thrash proof.getOutline(): DiagramOutline | null— The outline currently mirrored (null before the first update).update(diagram: DiagramLike | undefined): boolean— Sync the mirror to the model. Cheap and idempotent: returns false — having touched no DOM — when the topology-relevant signature is unchanged.dispose(): void
FocusContainmentController
tsclass FocusContainmentController
Methods
constructor(viewport: ViewportController, options: FocusContainmentOptions = {})isFullyVisible(bounds: Rectangle, padding = this.padding): boolean— Isboundsfully inside the padded visible box? The predicate the whole card turns on — and the one a test can assert directly.paddedViewBox(padding = this.padding): Rectangle— The visible world box, deflated bypaddingCSS pixels on every side.plan(bounds: Rectangle, padding = this.padding): ContainmentResult— Compute what would have to happen to bringboundsfully into view — WITHOUT touching the camera. Pure: this is what the tests assert, and whatensureVisiblethen applies.ensureVisible(bounds: Rectangle, padding = this.padding): ContainmentResult— Bringboundsfully into view. Returns what it did —'none'when the element was already visible, which is the common case and costs nothing.isAnimating(): boolean— True while a containment pan is animating.stop(): void— Cancel any in-flight pan.dispose(): void
LiveRegionController
tsclass LiveRegionController
Methods
constructor(container: HTMLElement, options: LiveRegionOptions = {})getElement(politeness: Politeness): HTMLElement— The live elements, for tests and for hosts that relocate them.getMessage(politeness: Politeness): string— What the region currently says.getSpeakCount(): number— How many times we have actually written to the DOM. The thrash proof.announce(message: string, politeness: Politeness = 'polite', force = false): boolean— Announce. Returns true if the message will be spoken, false if it was suppressed as a duplicate.announceError(message: string): boolean— Errors and validation failures. Always assertive, never coalesced.flushPending(): void— Speak any coalesced message immediately.clear(): void— Clear both regions (e.g. on blur) without announcing anything.dispose(): void
Was this page helpful?