Decorator Interface
Interface for drawing decoration graphics into, or on top of, the active ScreenViewports managed by ViewManager. Decorators generate Decorations.
extensions
Extends
Implemented by
Methods
Name | Description | |
---|---|---|
getDecorationGeometry(hit: HitDetail): undefined | GeometryStreamProps Optional | If Decorator.testDecorationHit or Decorator.overrideElementHit returned true, implement this method to return the snappable geometry for this Decorator. | |
getDecorationToolTip(hit: HitDetail): Promise<string | HTMLElement> Optional | If Decorator.testDecorationHit or Decorator.overrideElementHit returned true, implement this method to return the tooltip message for this Decorator. | |
onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> Optional | If Decorator.testDecorationHit or Decorator.overrideElementHit returned true, implement this method to handle a button event for this Decorator. | |
overrideElementHit(hit: HitDetail): boolean Optional | If the Decorator.decorate method created pickable graphics using a persistent element id instead of a transient id, | |
testDecorationHit(id: string): boolean Optional | If the Decorator.decorate method created pickable graphics, return true if the supplied Id is from this Decorator. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
decorate(context: DecorateContext): void | ViewportDecorator | Implement this method to add Decorations into the supplied DecorateContext. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
useCachedDecorations Readonly | undefined | "true" | ViewportDecorator | Override to enable cached decorations for this decorator. |
Defined in
- core/frontend/src/ViewManager.ts Line 23
Last Updated: 30 November, 2023