3D-City Model
    Preparing search index...

    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.

    The UI button that toggles/activates digging/excavation mode.

    instance - Singleton instance reference.

    const digState = new ExcavationState(digBtn);
    await digState.apply(app);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    button: undefined | HTMLButtonElement
    dependentStates: string[]

    Required/precondition states.

    exclusiveStates: string[]

    States that are deactivated when this state activates.

    informationWindow: undefined | InformationGeWindow

    Modal window for excavation instructions.

    name: string

    Name/identifier for the state.

    polygon: any

    The current interactive polygon drawing instance.

    restoreStates: string[]

    States that should be restored when this state ends.

    rightClickHandle: undefined | (() => void)

    Methods

    • Activates excavation mode: disables selection, launches polygon drawing, sets up button/camera/events, displays information window/modal with translated instructional content.

      Parameters

      • app: any

      Returns Promise<void>

    • Exits excavation mode: restores pointer, ends polygon drawing, re-binds activation button, cleans up the info/modal window, resets event listeners and camera flag.

      Parameters

      • app: any

      Returns boolean

      Always true.

    • Sets up right-click behavior: finalizes and executes pit creation via AddExcavationPit, then exits state.

      Parameters

      • app: any

      Returns void