AxisTriad
- class Communicator.AxisTriad()
This class provides an interface to the axis triad which is enabled by default. The default functionality orients the camera based on the axis that is clicked. This triad is initialized and associated with an overlay when the viewer is created. For additional information on overlays please refer to the
OverlayManager
More information can be found here.
Methods
Methods
disable
- AxisTriad.disable()
Disables this
AxisTriad
- Return type
- Returns
A promise that resolves on completion.
enable
- AxisTriad.enable()
Enables this
AxisTriad
- Return type
- Returns
A promise that resolves on completion.
getAnchor
- AxisTriad.getAnchor()
Gets the anchor position for this
AxisTriad
Default position is in the lower left corner.- Return type
- Returns
The overlay anchor value of the triad.
getEnabled
- AxisTriad.getEnabled()
Gets the current state of this
AxisTriad
- Return type
boolean
- Returns
true
if enabled andfalse
otherwise.
getOverlayId
- AxisTriad.getOverlayId()
Gets the overlay id. This id should be considered reserved and not be used by client applications.
- Return type
- Returns
The overlay id used by this
AxisTriad
getSelectionAxis
- AxisTriad.getSelectionAxis(selectionItem)
Checks if a selection is part of the axis triad, and return the corresponding axis.
- Arguments
selectionItem (
SelectionItem()
| null) – selection item to check.
- Return type
Axis | null
- Returns
Axis if selected, null otherwise.
insideOverlay
onClickSelection
- AxisTriad.onClickSelection(selection)
Called when the axis triad is clicked. Realigns the view along the axis selected by
selection
or does nothing if no axis is selected.- Arguments
selection (
SelectionItem()
| null) –
- Return type
Promise <void>
setAnchor
- AxisTriad.setAnchor(anchor)
Sets the anchor position for this
AxisTriad
- Arguments
anchor (OverlayAnchor) – The anchor position.
- Return type
Promise <void>
- Returns
A promise that resolves on completion.