update: types

* Add elements to flowoptions type
* add window interface to custom shims
This commit is contained in:
Braks
2021-10-21 00:24:59 +02:00
parent 31c896edb5
commit 77d2e01fc0
6 changed files with 20 additions and 13 deletions
@@ -29,7 +29,7 @@ const props = withDefaults(defineProps<ControlProps>(), {
const store = useStore()
const { zoomIn, zoomOut, fitView } = useZoomPanHelper()
const isInteractive = store.nodesDraggable && store.nodesConnectable && store.elementsSelectable
const isInteractive = computed(() => store.nodesDraggable && store.nodesConnectable && store.elementsSelectable)
const mapClasses = ['vue-flow__controls']
const onZoomInHandler = () => {
@@ -48,8 +48,8 @@ const onFitViewHandler = () => {
}
const onInteractiveChangeHandler = () => {
store.setInteractive?.(!isInteractive)
props.onInteractiveChange?.(!isInteractive)
store.setInteractive?.(!isInteractive.value)
props.onInteractiveChange?.(!isInteractive.value)
}
</script>
<template>