- useDrawStore(pinia?, hot?): 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">> Parameters
Optional
pinia: null | PiniaOptional
hot: StoreGeneric
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
$id
$id: "draw"
Returns a store, creates it if necessary.