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 Inherited Marker Set the position and add this Marker to the supplied DecorateContext, if it's visible.
drawFunc(ctx: CanvasRenderingContext2D): void Optional Inherited Marker Implement this function to draw onto the CanvasRenderingContext2D when this Marker is displayed.
drawHilited(ctx: CanvasRenderingContext2D): boolean Protected Inherited Marker When a Marker is displayed in its hilited state, this method is called first.
onMouseLeave(): void Inherited Marker Called when the mouse pointer leaves this Marker.
onMouseMove(ev: BeButtonEvent): void Inherited Marker Called when the mouse pointer moves over this Marker
pick(pt: Readonly<WritableXAndY>): boolean Inherited Marker Determine whether the point is within this Marker.
positionHtml(): void Protected Inherited Marker Position the HTMLElement for this Marker relative to the Marker's position in the view.
setImage(image: MarkerImage | Promise<MarkerImage>): void Inherited Marker Set the image for this marker.
setImageUrl(url: string): void Inherited Marker Set the image for this Marker from a URL.
setPosition(vp: Viewport, markerSet?: MarkerSet<Marker>): boolean Inherited Marker Set the position (in pixels) for this Marker in the supplied Viewport, based on its worldLocation.
setScaleFactor(range: Range1dProps): void Inherited 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 Inherited 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 Inherited ColorDef | undefined Marker The color for the shadowBlur when this Marker is hilited
_isHilited Protected Inherited boolean Marker Whether this marker is currently hilited or not.
_scaleFactor Protected Inherited Point2d | undefined Marker  
_scaleFactorRange Protected Inherited Range1d | undefined Marker  
htmlElement Inherited HTMLElement | undefined Marker An Optional (unique) HTMLElement to display with this Marker.
image Inherited MarkerImage | undefined Marker An image to draw for this Marker.
imageOffset Inherited Readonly<WritableXAndY> | undefined Marker The offset for Marker.image, in pixels, from the center of this Marker.
imageSize Inherited Readonly<WritableXAndY> | undefined Marker The size of Marker.image, in pixels.
label Inherited string | undefined Marker A text Label for this Marker.
labelAlign Inherited MarkerTextAlign | undefined Marker The text alignment for Marker.label.
labelBaseline Inherited MarkerTextBaseline | undefined Marker The text baseline for Marker.label.
labelColor Inherited MarkerFillStyle | undefined Marker The color for Marker.label.
labelFont Inherited string | undefined Marker The font for Marker.label.
labelMaxWidth Inherited number | undefined Marker The maximum with for Marker.label, in pixels.
labelOffset Inherited Readonly<WritableXAndY> | undefined Marker The offset for Marker.label, in pixels, from the center of this Marker.
position Inherited Point3d Marker The current position for the marker, in view coordinates (pixels).
rect Readonly Inherited ViewRect Marker The current rectangle for the marker, in view coordinates (pixels).
size Inherited Point2d Marker The size of this Marker, in pixels.
title Inherited string | HTMLElement Marker The title string, or HTMLElement, to show (only) in the ToolTip when the pointer is over this Marker.
tooltipOptions Inherited ToolTipOptions | undefined Marker The ToolTipOptions to use for Marker.title.
visible Inherited boolean Marker Whether this marker is currently enabled.
wantImage Accessor Inherited ReadOnly boolean Marker Return true to display Marker.image, if present.
worldLocation Inherited Point3d Marker The location of this Marker in world coordinates.

Defined in

Last Updated: 21 November, 2024