chore(types): Remove control events type
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { useZoomPanHelper, useVueFlow } from '../../composables'
|
||||
import type { ControlProps, ControlEvents } from '../../types/components'
|
||||
import type { ControlProps } from '../../types/components'
|
||||
import ControlButton from './ControlButton.vue'
|
||||
import PlusIcon from '~/assets/icons/plus.svg'
|
||||
import MinusIcon from '~/assets/icons/minus.svg'
|
||||
@@ -13,7 +13,12 @@ const props = withDefaults(defineProps<ControlProps>(), {
|
||||
showFitView: 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 { zoomIn, zoomOut, fitView } = useZoomPanHelper()
|
||||
|
||||
@@ -54,13 +54,6 @@ export interface ControlProps {
|
||||
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 */
|
||||
export type MiniMapNodeFunc<Data = ElementData> = (node: GraphNode<Data>) => string
|
||||
// hack for vue-type imports
|
||||
|
||||
Reference in New Issue
Block a user