From 263b6dff9f423f1f3bb3353cf5e865101d15dbda Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sun, 22 May 2022 18:38:36 +0200 Subject: [PATCH] refactor(vue-flow,components): camelCase custom events in `Controls.vue` --- .../additional-components/Controls/Controls.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/vue-flow/src/additional-components/Controls/Controls.vue b/packages/vue-flow/src/additional-components/Controls/Controls.vue index 2a1882aa..21fddd1c 100644 --- a/packages/vue-flow/src/additional-components/Controls/Controls.vue +++ b/packages/vue-flow/src/additional-components/Controls/Controls.vue @@ -11,10 +11,10 @@ import Unlock from '~/assets/icons/unlock.svg' const { showZoom = true, showFitView = true, showInteractive = true, fitViewParams } = defineProps() const emit = defineEmits<{ - (event: 'zoom-in'): void - (event: 'zoom-out'): void - (event: 'fit-view'): void - (event: 'interaction-change', active: boolean): void + (event: 'zoomIn'): void + (event: 'zoomOut'): void + (event: 'fitView'): void + (event: 'interactionChange', active: boolean): void }>() const { instance, nodesDraggable, nodesConnectable, elementsSelectable, setInteractive } = $(useVueFlow()) @@ -23,22 +23,22 @@ const isInteractive = computed(() => nodesDraggable && nodesConnectable && eleme const onZoomInHandler = () => { instance?.zoomIn() - emit('zoom-in') + emit('zoomIn') } const onZoomOutHandler = () => { instance?.zoomOut() - emit('zoom-out') + emit('zoomOut') } const onFitViewHandler = () => { instance?.fitView(fitViewParams) - emit('fit-view') + emit('fitView') } const onInteractiveChangeHandler = () => { setInteractive(!isInteractive.value) - emit('interaction-change', !isInteractive.value) + emit('interactionChange', !isInteractive.value) }