changeLocateState Method

Helper method to keep the view cursor, display of locate circle, and coordinate lock overrides consistent with isLocateEnabled and isSnapEnabled.

changeLocateState(enableLocate: boolean, enableSnap?: boolean, cursor?: string, coordLockOvr?: CoordinateLockOverrides): void

@note User must also have snapping enabled isSnapEnabledByUser, otherwise TentativePoint is used to snap.

Parameter Type Description
enableLocate boolean Value to pass to enableLocate. Tools that locate elements should always pass true to give the user feedback regarding the element at the current cursor location.
enableSnap boolean Optional value to pass to enableSnap. Tools that don't care about the element pick location should not pass true. Default is false.
cursor string Optional tool specific cursor override. Default is either cross or dynamics cursor depending on whether dynamics are currently active.
coordLockOvr CoordinateLockOverrides Optional tool specific coordinate lock overrides. A tool that only identifies elements and does not use BeButtonEvent.point can set ToolState.coordLockOvr to CoordinateLockOverrides.ACS
or CoordinateLockOverrides.All, otherwise locate is affected by the input point being first projected to the ACS plane. A tool that will use BeButtonEvent.point, especially those that call enableSnap
should honor all locks and leave ToolState.coordLockOvr set to CoordinateLockOverrides.None, the default for ViewTool and PrimitiveTool.

Returns - void

Defined in

Last Updated: 21 November, 2024