ToolAdmin Class

Controls operation of Tools. Administers the current view, primitive, and idle tools. Forwards events to the appropriate tool.

Methods

Name Description
adjustPoint(pointActive: Point3d, vp: ScreenViewport, projectToACS: boolean = true, applyLocks: boolean = true): void    
adjustPointToACS(pointActive: Point3d, vp: Viewport, perpendicular: boolean): void    
adjustPointToGrid(pointActive: Point3d, vp: Viewport): void    
adjustSnapPoint(perpendicular: boolean = true): void    
convertTouchEndToButtonUp(ev: BeTouchEvent, button: BeButton = BeButton.Data): Promise<void> Can be called by tools that wish to emulate releasing the mouse button for onTouchEnd or onTouchComplete.  
convertTouchMoveStartToButtonDownAndMotion(startEv: BeTouchEvent, ev: BeTouchEvent, button: BeButton = BeButton.Data): Promise<void> Can be called by tools that wish to emulate moving the mouse with a button depressed for onTouchMoveStart.  
convertTouchMoveToMotion(ev: BeTouchEvent): Promise<void> Can be called by tools that wish to emulate a mouse motion event for onTouchMove.  
convertTouchStartToButtonDown(ev: BeTouchEvent, button: BeButton = BeButton.Data): Promise<void> Can be called by tools that wish to emulate pressing the mouse button for onTouchStart or onTouchMoveStart.  
convertTouchTapToButtonDownAndUp(ev: BeTouchEvent, button: BeButton = BeButton.Data): Promise<void> Can be called by tools that wish to emulate mouse button down/up events for onTouchTap.  
doRedoOperation(): Promise<boolean> Called to redo previous data button for primitive tools or undo last write operation.  
doUndoOperation(): Promise<boolean> Called to undo previous data button for primitive tools or undo last write operation.  
filterViewport(vp: ScreenViewport): boolean Protected Return true to filter (ignore) events to the given viewport  
getToolTip(hit: HitDetail): Promise<HTMLElement | string> Ask the current tool to provide tooltip contents for the supplied HitDetail.  
processWheelEvent(ev: BeWheelEvent, doUpdate: boolean): Promise<EventHandled> Performs default handling of mouse wheel event (zoom in/out)  
sendEndDragEvent(ev: BeButtonEvent): Promise<any>    
setCursor(cursor: string | undefined): void    
setLocateCircleOn(locateOn: boolean): void    
setLocateCursor(enableLocate: boolean): void    
syncToolSettingsProperties(toolId: string, syncProperties: ToolSettingsPropertySyncItem[]): void Method used by interactive tools to send updated values to UI components, typically showing tool settings. Beta
exceptionHandler(exception: any): Promise<any> Static A function that catches exceptions occurring inside ToolAdmin.eventLoop. Beta

Properties

Name Type Description
acsContextLock boolean If ACS Plane Lock is on, standard view rotations are relative to the ACS instead of global.  
acsPlaneSnapLock boolean If ACS Snap Lock is on, project snap points to the ACS plane.  
activeTool Accessor ReadOnly InteractiveTool | undefined The currently active InteractiveTool.  
activeToolChanged BeEvent<(tool: Tool, start: StartOrResume) => void> Event raised whenever the active tool changes.  
assemblyLock boolean Apply operations such as transform, copy or delete to all members of an assembly.  
currentTool Accessor ReadOnly InteractiveTool The current tool.  
cursorView Accessor ReadOnly ScreenViewport | undefined Get the ScreenViewport where the cursor is currently, if any.  
gridLock boolean If Grid Lock is on, project data points to grid.  
idleTool Accessor ReadOnly IdleTool The idleTool handles events that are not otherwise processed.  
isLocateCircleOn Accessor ReadOnly boolean    
markupView undefined | ScreenViewport    
primitiveTool Accessor ReadOnly PrimitiveTool | undefined    
viewTool Accessor ReadOnly ViewTool | undefined    

Object Literals

Name Description
exceptionOptions Static Options for how uncaught exceptions should be handled.

Defined in

Last Updated: 05 June, 2020