HoopsToolsMeasurementActionsElement

class wvc.HoopsToolsMeasurementActionsElement()

Provides measurement tool selection buttons for the Hoops Tools Panel.

This component displays interactive buttons for different measurement tools including point-to-point distance, face-to-face distance, face angle, and edge length measurements.

It is a dumb component that dispatches operator IDs on selection, with no knowledge of the webviewer. The component highlights the currently active measurement tool based on the activeToolOperator property.

Examples

<hoops-tools-measurement-actions></hoops-tools-measurement-actions>

<script>
  const actions = document.getElementsByTagName('hoops-tools-measurement-actions')[0];
  actions.activeToolOperator = OperatorId.MeasurePointPointDistance;
  actions.addEventListener('measurement-tool-selected', (event) => {
    console.log('Tool selected:', event.detail.operator);
  });
</script>

Custom Element

hoops-tools-measurement-actions

Attributes

activeToolOperator

The currently active measurement tool operator

Events

measurement-tool-selected

Dispatched when a measurement tool button is clicked

Since

2025.7.0

Index

Constructors

Properties

Methods

Constructors

wvc.HoopsToolsMeasurementActionsElement.constructor()
HoopsToolsMeasurementActionsElement(): HoopsToolsMeasurementActionsElement

Returns: HoopsToolsMeasurementActionsElement

Properties

wvc.HoopsToolsMeasurementActionsElement.activeToolOperator

optional

activeToolOperator: OperatorId

Methods

wvc.HoopsToolsMeasurementActionsElement.selectMeasurementTool()
selectMeasurementTool(operator: OperatorId): void

Parameters

operator: OperatorId

Returns: void