update(types): Correct __vf typing

* fix all uses of __vf so the actual type works properly
* correct the class and style props

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-21 13:33:12 +01:00
parent 0e9f8c5fc2
commit e4ead738c9
4 changed files with 40 additions and 27 deletions
+14 -12
View File
@@ -1,22 +1,24 @@
import { Component, DefineComponent } from 'vue'
import { Component, CSSProperties, DefineComponent } from 'vue'
import { XYPosition, ElementId, Position } from './types'
import { HandleElement } from '~/types/handle'
export interface Node<T = any> {
id: ElementId
position: XYPosition
type?: string
__vf?:
| {
position?: XYPosition
isDragging?: boolean
width?: number
height?: number
handleBounds?: any
}
| any
data?: T
style?: any
__vf?: {
position: XYPosition
isDragging?: boolean
width: number
height: number
handleBounds?: {
source?: HandleElement[] | null
target?: HandleElement[] | null
}
}
class?: string
style?: CSSProperties
data?: T
targetPosition?: Position
sourcePosition?: Position
isHidden?: boolean