diff --git a/examples/main.ts b/examples/main.ts index d3366a00..928d4040 100644 --- a/examples/main.ts +++ b/examples/main.ts @@ -1,6 +1,5 @@ import { createApp } from 'vue' import './index.css' -import { createPinia } from 'pinia' import { DraggablePlugin } from '@braks/revue-draggable' import App from './App.vue' import { router } from './router' @@ -10,5 +9,4 @@ const app = createApp(App) app.config.performance = true app.use(router) app.use(DraggablePlugin) -app.use(createPinia()) app.mount('#root') diff --git a/src/types/store.ts b/src/types/store.ts index 9bda61f8..0fd1fca3 100644 --- a/src/types/store.ts +++ b/src/types/store.ts @@ -22,13 +22,13 @@ import { FlowHooks } from './hooks' export interface FlowState extends Omit { hooks: FlowHooks - instance: FlowInstance | undefined + instance?: FlowInstance elements: FlowElements - d3Zoom: D3Zoom | undefined - d3Selection: D3Selection | undefined - d3ZoomHandler: D3ZoomHandler | undefined + d3Zoom?: D3Zoom + d3Selection?: D3Selection + d3ZoomHandler?: D3ZoomHandler minZoom: number maxZoom: number translateExtent: TranslateExtent @@ -36,16 +36,16 @@ export interface FlowState extends Omit { dimensions: Dimensions transform: Transform - selectedElements: FlowElements | undefined - selectedNodesBbox: Rect | undefined + selectedElements?: FlowElements + selectedNodesBbox?: Rect nodesSelectionActive: boolean selectionActive: boolean userSelectionRect: SelectionRect multiSelectionActive: boolean - connectionNodeId: ElementId | undefined - connectionHandleId: ElementId | undefined - connectionHandleType: HandleType | undefined + connectionNodeId?: ElementId + connectionHandleId?: ElementId + connectionHandleType?: HandleType connectionPosition: XYPosition connectionMode: ConnectionMode