SectionMarker Class

A Marker associated with a SectionDrawingLocationState, displayed as a canvas decoration at the location of the section. Clicking on the marker toggles display of the section graphics. Mousing over the marker produces a toolbar with additional interactions.

@see - HyperModelingDecorator for a Decorator capable of displaying section markers for each section drawing location.

Extends

Methods

Name Description
constructor(state: SectionDrawingLocationState): SectionMarker Constructor, typically invoked indirectly via HyperModelingDecorator.  

Inherited methods

Name Inherited from Description
addDecoration(context: DecorateContext): void Marker Set the position and add this Marker to the supplied DecorateContext, if it's visible.
drawFunc(ctx: CanvasRenderingContext2D): void Optional Marker Implement this function to draw onto the CanvasRenderingContext2D when this Marker is displayed.
drawHilited(ctx: CanvasRenderingContext2D): boolean Protected Marker When a Marker is displayed in its hilited state, this method is called first.
onMouseLeave(): void Marker Called when the mouse pointer leaves this Marker.
onMouseMove(ev: BeButtonEvent): void Marker Called when the mouse pointer moves over this Marker
pick(pt: Readonly<WritableXAndY>): boolean Marker Determine whether the point is within this Marker.
positionHtml(): void Protected Marker Position the HTMLElement for this Marker relative to the Marker's position in the view.
setImage(image: MarkerImage | Promise<MarkerImage>): void Marker Set the image for this marker.
setImageUrl(url: string): void Marker Set the image for this Marker from a URL.
setPosition(vp: Viewport, markerSet?: MarkerSet<Marker>): boolean Marker Set the position (in pixels) for this Marker in the supplied Viewport, based on its worldLocation.
setScaleFactor(range: Range1dProps): void Marker Establish a range of scale factors to increases and decrease the size of this Marker based on its distance from the camera.
makeFrom<T extends Marker>(other: Marker, ...args: any[]): T Static Marker Make a new Marker at the same position and size as this Marker.

Properties

Name Type Description
description Readonly string A description displayed as part of the tooltip when this marker is clustered with other markers.  
isActive Accessor ReadOnly boolean Returns true if this is the "active" section marker.  
state Readonly SectionDrawingLocationState The section drawing location state associated with the marker.  

Inherited properties

Name Type Inherited from Description
_hiliteColor Protected ColorDef | undefined Marker The color for the shadowBlur when this Marker is hilited
_isHilited Protected boolean Marker Whether this marker is currently hilited or not.
_scaleFactor Protected Point2d | undefined Marker  
_scaleFactorRange Protected Range1d | undefined Marker  
htmlElement HTMLElement | undefined Marker An Optional (unique) HTMLElement to display with this Marker.
image MarkerImage | undefined Marker An image to draw for this Marker.
imageOffset Readonly<WritableXAndY> | undefined Marker The offset for Marker.image, in pixels, from the center of this Marker.
imageSize Readonly<WritableXAndY> | undefined Marker The size of Marker.image, in pixels.
label string | undefined Marker A text Label for this Marker.
labelAlign MarkerTextAlign | undefined Marker The text alignment for Marker.label.
labelBaseline MarkerTextBaseline | undefined Marker The text baseline for Marker.label.
labelColor MarkerFillStyle | undefined Marker The color for Marker.label.
labelFont string | undefined Marker The font for Marker.label.
labelMaxWidth number | undefined Marker The maximum with for Marker.label, in pixels.
labelOffset Readonly<WritableXAndY> | undefined Marker The offset for Marker.label, in pixels, from the center of this Marker.
position Point3d Marker The current position for the marker, in view coordinates (pixels).
rect Readonly ViewRect Marker The current rectangle for the marker, in view coordinates (pixels).
size Point2d Marker The size of this Marker, in pixels.
title string | HTMLElement Marker The title string, or HTMLElement, to show (only) in the ToolTip when the pointer is over this Marker.
tooltipOptions ToolTipOptions | undefined Marker The ToolTipOptions to use for Marker.title.
visible boolean Marker Whether this marker is currently enabled.
wantImage Accessor ReadOnly boolean Marker Return true to display Marker.image, if present.
worldLocation Point3d Marker The location of this Marker in world coordinates.

Defined in

Last Updated: 10 May, 2024