• Returns a store, creates it if necessary.

    Parameters

    • Optionalpinia: null | Pinia

      Pinia instance to retrieve the store

    • Optionalhot: StoreGeneric

      dev only hot module replacement

    Returns Store<"draw", _UnwrapAll<Pick<{
        activeTool: Ref<ActiveToolList, ActiveToolList>;
        addGraphic: ((graphic: any) => string);
        clearSelection: (() => void);
        getSelectedGraphic: (() => any);
        graphics: Reactive<any[]>;
        removeGraphic: ((id: string) => void);
        selectGraphic: ((id: string) => void);
        selectedGraphicId: Ref<null | string, null | string>;
        setActiveTool: ((tool: ActiveToolList) => void);
        setSupportedTypes: ((types: DrawTypeConfig[]) => void);
        supportedTypes: Ref<{
            enabled?: boolean;
            options?: Record<string, any>;
            type: string;
        }[], DrawTypeConfig[] | {
            enabled?: boolean;
            options?: Record<string, any>;
            type: string;
        }[]>;
        updateGraphicGeometry: ((id: string, geometry: any) => void);
    },
        | "supportedTypes"
        | "activeTool"
        | "graphics"
        | "selectedGraphicId">>, Pick<{
        activeTool: Ref<ActiveToolList, ActiveToolList>;
        addGraphic: ((graphic: any) => string);
        clearSelection: (() => void);
        getSelectedGraphic: (() => any);
        graphics: Reactive<any[]>;
        removeGraphic: ((id: string) => void);
        selectGraphic: ((id: string) => void);
        selectedGraphicId: Ref<null | string, null | string>;
        setActiveTool: ((tool: ActiveToolList) => void);
        setSupportedTypes: ((types: DrawTypeConfig[]) => void);
        supportedTypes: Ref<{
            enabled?: boolean;
            options?: Record<string, any>;
            type: string;
        }[], DrawTypeConfig[] | {
            enabled?: boolean;
            options?: Record<string, any>;
            type: string;
        }[]>;
        updateGraphicGeometry: ((id: string, geometry: any) => void);
    }, never>, Pick<{
        activeTool: Ref<ActiveToolList, ActiveToolList>;
        addGraphic: ((graphic: any) => string);
        clearSelection: (() => void);
        getSelectedGraphic: (() => any);
        graphics: Reactive<any[]>;
        removeGraphic: ((id: string) => void);
        selectGraphic: ((id: string) => void);
        selectedGraphicId: Ref<null | string, null | string>;
        setActiveTool: ((tool: ActiveToolList) => void);
        setSupportedTypes: ((types: DrawTypeConfig[]) => void);
        supportedTypes: Ref<{
            enabled?: boolean;
            options?: Record<string, any>;
            type: string;
        }[], DrawTypeConfig[] | {
            enabled?: boolean;
            options?: Record<string, any>;
            type: string;
        }[]>;
        updateGraphicGeometry: ((id: string, geometry: any) => void);
    },
        | "setSupportedTypes"
        | "setActiveTool"
        | "addGraphic"
        | "removeGraphic"
        | "selectGraphic"
        | "clearSelection"
        | "getSelectedGraphic"
        | "updateGraphicGeometry">>

Properties

Properties

$id: "draw"

Id of the store. Used by map helpers.