SectionMarkerHandler Class

Supplies interactions with SectionMarkers, including a mini-toolbar displayed when the mouse hovers over a marker and what action occurs when the user clicks a marker. The base implementation supplies the following interactions:

  • Click: Toggle display of the section graphics and clip volume; apply the section's spatial view if toggling on.
  • Toolbar:
    • Apply Section: Applies the section location's spatial view to the viewport and displays the 2d section graphics.
    • Open Drawing: Navigates to the section drawing view. By default, this applies the section drawing view to the viewport.
    • Open Sheet: Navigates to the ViewAttachment of the section drawing on a Sheet. Disabled if no such attachment exists.

see HyperModelingConfig to override the default handler by supplying a subclass of SectionMarkerHandler.

see HyperModelingDecorator for various methods that might be usefully wired up to marker click or toolbar actions.

Methods

Name Description
constructor(): SectionMarkerHandler    
activateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<boolean> Respond to activation of the specified marker.  
deactivateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void> Respond to deactivation of the specified marker.  
executeCommand(commandId: string, marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void> Execute the command associated with the specified tool bar item.  
getToolbarProps(marker: SectionMarker, _decorator: HyperModelingDecorator): AbstractToolbarProps Return toolbar items for the specified marker.  
isMarkerVisible(marker: SectionMarker, decorator: HyperModelingDecorator, config: SectionMarkerConfig): boolean Customize which markers are visible.  

Defined in

Last Updated: 11 June, 2024