refactor(controls): move controls into separate package

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-13 14:55:14 +01:00
committed by Braks
parent 2eaf9e4340
commit a55f39ba25
17 changed files with 348 additions and 56 deletions
+39
View File
@@ -0,0 +1,39 @@
# Vue Flow: Toolbar Component
This is a control component for Vue Flow.
It can be used to control the canvas interactions, like zooming in, zooming out, fitting the view and locking interactions.
## 🛠 Setup
```bash
# install
$ yarn add @vue-flow/controls
# or
$ npm i --save @vue-flow/controls
```
## 🎮 Quickstart
```vue
<script setup>
import { VueFlow } from '@vue-flow/core'
import { Controls } from '@vue-flow/controls'
// import the default styles
import '@vue-flow/controls/dist/style.css'
import initialElements from './initial-elements'
// some nodes and edges
const elements = ref(initialElements)
</script>
<template>
<VueFlow v-model="elements" fit-view-on-init class="vue-flow-basic-example">
<Controls />
</VueFlow>
</template>
```