update(examples): import order

This commit is contained in:
Braks
2022-03-31 10:50:27 +02:00
parent 546dd4baaf
commit d913df6187
4 changed files with 6 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ const elements = ref<Elements>([
])
const { onPaneReady, onNodeDragStop, onConnect, instance, addEdges, store } = useVueFlow()
onPaneReady(({ fitView }) => {
fitView({ padding: 0.1 })
fitView()
})
onNodeDragStop((e) => console.log('drag stop', e))
onConnect((params) => addEdges([params]))

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, Node, useVueFlow } from '@braks/vue-flow'
import Sidebar from './Sidebar.vue'
import { VueFlow, FlowInstance, Node, useVueFlow } from '@braks/vue-flow'
let id = 0
const getId = () => `dndnode_${id++}`

View File

@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, Background, MarkerType, useVueFlow, Edge, Node } from '@braks/vue-flow'
import CustomEdge from './CustomEdge.vue'
import CustomEdge2 from './CustomEdge2.vue'
import CustomLabel from './CustomLabel.vue'
import { VueFlow, MiniMap, Controls, Background, MarkerType, useVueFlow, Edge, Node } from '@braks/vue-flow'
const initialNodes: Node[] = [
{ id: '1', type: 'input', label: 'Input 1', position: { x: 250, y: 0 } },