feat: Add moveable to ResizeRotateNode.vue
This commit is contained in:
@@ -27,8 +27,8 @@ const onLoad = (flowInstance: FlowInstance) => {
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@import '../node_modules/@braks/vue-flow/dist/style.css';
|
||||
@import '../node_modules/@braks/vue-flow/dist/theme-default.css';
|
||||
@import '@braks/vue-flow/dist/style.css';
|
||||
@import '@braks/vue-flow/dist/theme-default.css';
|
||||
|
||||
html,
|
||||
body,
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
<script lang="ts" setup></script>
|
||||
<script lang="ts" setup>
|
||||
import type { MoveableEvents } from 'vue3-moveable'
|
||||
import Moveable from 'vue3-moveable'
|
||||
import type { Dimensions } from '@braks/vue-flow'
|
||||
|
||||
<template></template>
|
||||
const props = defineProps<{
|
||||
id: string
|
||||
label: string
|
||||
dimensions: Dimensions
|
||||
}>()
|
||||
|
||||
const el = ref()
|
||||
|
||||
const onScale = ({ scale, transform, target }: MoveableEvents['scale']) => {}
|
||||
|
||||
const onRotate = () => {}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="el" class="vue-flow__node-default">
|
||||
{{ label }}
|
||||
</div>
|
||||
<Moveable :target="[`[data-id='${id}']`]" :scalable="true" :rotatable="true" @scale="onScale" @rotate="onRotate" />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user