Decorator Interface

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

Extends

Implemented by

Methods

Name Description
getDecorationGeometry(hit: HitDetail): GeometryStreamProps | undefined Optional If Decorator.testDecorationHit returned true, implement this method to return the snappable geometry for this Decorator.  
getDecorationToolTip(hit: HitDetail): Promise<HTMLElement | string> Optional If Decorator.testDecorationHit returned true, implement this method to return the tooltip message for this Decorator.  
onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> Optional If Decorator.testDecorationHit returned true, implement this method to handle a button event for this Decorator.  
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 undefined | true ViewportDecorator Override to enable cached decorations for this decorator.

Defined in

Last Updated: 17 September, 2020