chore(types): Remove control events type
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useZoomPanHelper, useVueFlow } from '../../composables'
|
import { useZoomPanHelper, useVueFlow } from '../../composables'
|
||||||
import type { ControlProps, ControlEvents } from '../../types/components'
|
import type { ControlProps } from '../../types/components'
|
||||||
import ControlButton from './ControlButton.vue'
|
import ControlButton from './ControlButton.vue'
|
||||||
import PlusIcon from '~/assets/icons/plus.svg'
|
import PlusIcon from '~/assets/icons/plus.svg'
|
||||||
import MinusIcon from '~/assets/icons/minus.svg'
|
import MinusIcon from '~/assets/icons/minus.svg'
|
||||||
@@ -13,7 +13,12 @@ const props = withDefaults(defineProps<ControlProps>(), {
|
|||||||
showFitView: true,
|
showFitView: true,
|
||||||
showInteractive: true,
|
showInteractive: true,
|
||||||
})
|
})
|
||||||
const emit = defineEmits<ControlEvents>()
|
const emit = defineEmits<{
|
||||||
|
(event: 'zoom-in'): void
|
||||||
|
(event: 'zoom-out'): void
|
||||||
|
(event: 'fit-view'): void
|
||||||
|
(event: 'interaction-change', active: boolean): void
|
||||||
|
}>()
|
||||||
|
|
||||||
const { store } = useVueFlow()
|
const { store } = useVueFlow()
|
||||||
const { zoomIn, zoomOut, fitView } = useZoomPanHelper()
|
const { zoomIn, zoomOut, fitView } = useZoomPanHelper()
|
||||||
|
|||||||
@@ -54,13 +54,6 @@ export interface ControlProps {
|
|||||||
fitViewParams?: FitViewParams
|
fitViewParams?: FitViewParams
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ControlEvents {
|
|
||||||
(event: 'zoom-in'): void
|
|
||||||
(event: 'zoom-out'): void
|
|
||||||
(event: 'fit-view'): void
|
|
||||||
(event: 'interaction-change', active: boolean): void
|
|
||||||
}
|
|
||||||
|
|
||||||
/** expects a node and returns a color value */
|
/** expects a node and returns a color value */
|
||||||
export type MiniMapNodeFunc<Data = ElementData> = (node: GraphNode<Data>) => string
|
export type MiniMapNodeFunc<Data = ElementData> = (node: GraphNode<Data>) => string
|
||||||
// hack for vue-type imports
|
// hack for vue-type imports
|
||||||
|
|||||||
Reference in New Issue
Block a user