geoview-core - v2.3.0
    Preparing search index...

    Interface ISwiperState

    Represents the Swiper Zustand store slice.

    Manages state for the swiper including layer paths and orientation.

    interface ISwiperState {
        actions: {
            setInteractive: (interactive: boolean) => void;
            setLayerPaths: (layerPaths: string[]) => void;
            setLayerSides: (layerSides: Record<string, SwipeSide>) => void;
            setOrientation: (orientation: SwipeOrientation) => void;
            setSwiperPosition: (position: number) => void;
        };
        interactive: boolean;
        layerPaths: string[];
        layerSides: Record<string, SwipeSide>;
        orientation: SwipeOrientation;
        swiperPosition: number;
    }
    Index
    actions: {
        setInteractive: (interactive: boolean) => void;
        setLayerPaths: (layerPaths: string[]) => void;
        setLayerSides: (layerSides: Record<string, SwipeSide>) => void;
        setOrientation: (orientation: SwipeOrientation) => void;
        setSwiperPosition: (position: number) => void;
    }

    Actions to mutate the Swiper state.

    Type Declaration

    • setInteractive: (interactive: boolean) => void

      Sets whether the swiper is interactive (user can customize it).

    • setLayerPaths: (layerPaths: string[]) => void

      Sets the full list of layer paths for the swiper.

    • setLayerSides: (layerSides: Record<string, SwipeSide>) => void

      Sets the visible side for each participating layer path.

    • setOrientation: (orientation: SwipeOrientation) => void

      Sets the swiper orientation.

    • setSwiperPosition: (position: number) => void

      Sets the swiper position.

    interactive: boolean

    Whether the user can add/remove layers and set their side from the layer settings panel.

    layerPaths: string[]

    The list of layer paths currently participating in the swiper.

    layerSides: Record<string, SwipeSide>

    The visible side of the swiper bar for each participating layer path.

    orientation: SwipeOrientation

    The current orientation of the swiper divider.

    swiperPosition: number

    The position of the swiper divider, between 0 and 100.