Singleton constructor. Returns existing instance if already created.
Required/precondition states.
States that are deactivated when this state activates.
Modal window for excavation instructions.
Name/identifier for the state.
The current interactive polygon drawing instance.
States that should be restored when this state ends.
Activates excavation mode: disables selection, launches polygon drawing, sets up button/camera/events, displays information window/modal with translated instructional content.
Exits excavation mode: restores pointer, ends polygon drawing, re-binds activation button, cleans up the info/modal window, resets event listeners and camera flag.
Always true.
Removes the right-click event handler.
Sets up right-click behavior: finalizes and executes pit creation via AddExcavationPit, then exits state.
ExcavationState – App UI state for interactive excavation pit/dig editing.
Implements singleton enforcement (only one excavation state may be active at a time). Manages the polygon drawing workflow, custom button and viewer event handlers, in-app info window, and calls the command pattern to execute the addition of pits after polygon completion.
Param: button
The UI button that toggles/activates digging/excavation mode.
Static
instance - Singleton instance reference.
Example