feat: add draghandle prop to node

* specify a drag handle on the node

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-21 21:50:49 +01:00
parent b10207021f
commit a55e33f91f
4 changed files with 23 additions and 5 deletions
+4 -4
View File
@@ -1,14 +1,14 @@
<script lang="ts" setup>
import { CSSProperties, HTMLAttributes } from 'vue'
import { Component, CSSProperties, DefineComponent } from 'vue'
interface EdgeTextProps extends HTMLAttributes {
interface EdgeTextProps {
x: number
y: number
label?:
| string
| {
component: any
props?: any
component: Component | DefineComponent
props?: Record<string, any>
}
labelStyle?: CSSProperties
labelShowBg?: boolean
+1
View File
@@ -160,6 +160,7 @@ export default {
<template>
<DraggableCore
cancel=".nodrag"
:handle="props.node.dragHandle"
:disabled="!draggable"
:scale="scale"
:grid="props.snapGrid"