Decorator Interface

Interface for drawing decoration graphics into, or on top of, the active ScreenViewports managed by ViewManager. Decorators generate Decorations.

Extends

Implemented by

Methods

Name Description
getDecorationGeometry(hit: HitDetail): undefined | GeometryStreamProps Optional If testDecorationHit or overrideElementHit returned true, implement this method to return the snappable geometry for this Decorator.  
getDecorationToolTip(hit: HitDetail): Promise<string | HTMLElement> Optional If testDecorationHit or overrideElementHit returned true, implement this method to return the tooltip message for this Decorator.  
onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> Optional If testDecorationHit or overrideElementHit returned true, implement this method to handle a button event for this Decorator.  
overrideElementHit(hit: HitDetail): boolean Optional If the decorate method created pickable graphics using a persistent element id instead of a transient id,  
testDecorationHit(id: string): boolean Optional If the 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 Inherited ViewportDecorator Implement this method to add Decorations into the supplied DecorateContext.

Inherited properties

Name Type Inherited from Description
useCachedDecorations Readonly Inherited "true" | undefined ViewportDecorator Override to enable cached decorations for this decorator.

Defined in

Last Updated: 21 November, 2024