docs: update examples

This commit is contained in:
braks
2022-11-13 19:13:43 +01:00
committed by Braks
parent f6a97c504b
commit cd03034bdb
35 changed files with 222 additions and 161 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ const elements = ref([
</script>
<template>
<VueFlow v-model="elements" class="interactionflow" :fit-view-on-init="true">
<VueFlow v-model="elements" class="interactionflow" fit-view-on-init>
<InteractionControls />
</VueFlow>
</template>
@@ -23,14 +23,21 @@ const {
} = useVueFlow()
const captureZoomClick = ref(false)
const captureZoomScroll = ref(false)
onConnect((params) => addEdges([params]))
onNodeDragStart((e) => console.log('drag start', e))
onNodeDragStop((e) => console.log('drag stop', e))
onPaneClick((event) => captureZoomClick.value && console.log('pane click', event))
onPaneScroll((event) => captureZoomScroll.value && console.log('pane scroll', event))
onPaneContextMenu((event) => captureZoomClick.value && console.log('pane ctx menu', event))
onMoveEnd((flowTransform) => console.log('move end', flowTransform))
</script>
@@ -6,7 +6,7 @@
font-size: 11px;
background-color: lightgray;
border-bottom-right-radius: 10px;
padding: 12px;
padding: 8px;
}
.interactionflow .controls .label {