Creates a new editor instance for the specified view.
The view that this editor will handle input for
Gets the currently active cursor type.
The current cursor type, or undefined if none is set
Prompts the user to input a point by clicking on the view.
This method returns a promise that resolves when the user clicks on the view, providing the world coordinates of the click point.
Promise that resolves to the input point coordinates
Prompts the user to select entities using box selection.
This method allows the user to drag a selection box to select multiple entities at once. The selection behavior follows CAD conventions (left-to-right for crossing, right-to-left for window).
Promise that resolves to the selection set containing selected entity IDs
Restores the previously set cursor.
This is useful for temporarily changing the cursor and then reverting to the previous state.
Sets the cursor appearance for the view.
The previous cursor type is stored for potential restoration.
The cursor type to set
Advanced input handler for CAD operations providing high-level user interaction methods.
This class serves as a wrapper for all types of user input including:
The editor abstracts away low-level mouse and keyboard events, providing a clean API for command implementations. Instead of listening to raw DOM events, commands should use the methods provided by this class.
Example