OperatorManager
- class Communicator.OperatorManager()
Main interface into the Operator functionality of the viewer. The OperatorManager manages a number of operators in a stack and allows the user to register and unregister new operators.
Methods
Methods
clear
- OperatorManager.clear()
Removes all operators from the stack
- Return type
void
getOperator
- OperatorManager.getOperator(id)
- Arguments
id (Orbit) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Pan) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Zoom) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (WindowZoom) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Walk) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (KeyboardWalk) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (WalkMode) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Turntable) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Select) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (AreaSelect) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (RayDrillSelect) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (RedlineCircle) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (RedlineText) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (RedlineRectangle) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (RedlinePolyline) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (MeasureEdgeLength) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (MeasureFaceFaceDistance) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (MeasurePointPointDistance) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (MeasureFaceFaceAngle) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (MeasurePolylineDistance) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (MeasurePolygonArea) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Note) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Cutting) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (Handle) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (NavCube) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (BuiltInOperatorId) –
- Return type
- OperatorManager.getOperator(id)
- Arguments
id (OperatorId) –
- Return type
Operator()
| null
indexOf
- OperatorManager.indexOf(operatorId)
Returns the index of an operator on the stack
- Arguments
operatorId (OperatorId) –
- Return type
number
- Returns
operator index or -1 if not found
injectEvent
- OperatorManager.injectEvent(event, eventType)
- Arguments
event (
MouseInputEvent()
|TouchInputEvent()
|KeyInputEvent()
|MouseWheelInputEvent()
) –eventType (EventType) –
- Return type
Promise <void>
peek
- OperatorManager.peek()
- Return type
- Returns
the operator id at the top of the stack
pop
- OperatorManager.pop()
Removes an operator from the top of the stack
- Return type
OperatorId | undefined
- Returns
the operator id
push
- OperatorManager.push(operatorId)
Adds an operator on the stack if it’s not already on the stack
- Arguments
operatorId (OperatorId) – id of the operator to add to the stack
- Return type
boolean
- Returns
boolean indicating success or failure
registerCustomOperator
- OperatorManager.registerCustomOperator(operator)
Registers a custom operator
- Arguments
operator (
Operator()
) –
- Return type
- Returns
operatorId
remove
- OperatorManager.remove(operatorId)
Removes an operator from the stack
- Arguments
operatorId (OperatorId) – id of the operator to remove from the stack
- Return type
void
replaceOperator
- OperatorManager.replaceOperator(previousOperatorId, newOperatorId)
Replaces the operator that the specified id refers to. Returns a boolean indicating success or failure.
- Arguments
previousOperatorId (OperatorId) – operator id for the operator to be replaced.
newOperatorId (OperatorId) – operator id for the new operator.
- Return type
boolean
set
- OperatorManager.set(operatorId, position)
Sets a position on the stack to an operator if it’s not already on the stack If there is already an operator in that position, it is replaced.
- Arguments
operatorId (OperatorId) – id of the operator to add to the stack
position (
number()
) – position on the stack to assign
- Return type
boolean
- Returns
boolean indicating success or failure
size
- OperatorManager.size()
- Return type
number
- Returns
the operator stack size
unregisterCustomOperator
- OperatorManager.unregisterCustomOperator(operatorId)
Removes a custom operator from the registered operator list.
- Arguments
operatorId (OperatorId) –
- Return type
void