refactor: pass props to edge/nodewrapper separately

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-22 01:22:27 +01:00
parent a03f658794
commit c35673c622
18 changed files with 204 additions and 148 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import { Component, CSSProperties, DefineComponent } from 'vue'
import { ArrowHeadType, ElementId, Position } from './flow'
import { EdgeTextProps } from '~/types/components'
export interface Edge<T = any> {
id: ElementId
@@ -14,8 +15,8 @@ export interface Edge<T = any> {
label?:
| string
| {
component: Component | DefineComponent
props?: Record<string, any>
component: DefineComponent<EdgeTextProps>
props?: EdgeTextProps
}
labelStyle?: any
labelShowBg?: boolean
+1 -1
View File
@@ -2,7 +2,7 @@ import { Component, CSSProperties, DefineComponent } from 'vue'
import { XYPosition, ElementId, Position } from './flow'
import { HandleElement } from './components'
interface VFInternals {
export interface VFInternals {
position: XYPosition
isDragging?: boolean
width: number