feat(nodes): nested boundaries

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent f00f34d84b
commit 3f0b0dbd70
8 changed files with 165 additions and 109 deletions
+7 -5
View File
@@ -1,17 +1,17 @@
import { DraggableOptions } from '@braks/revue-draggable'
import { XYPosition, Position, SnapGrid, Element } from './flow'
import { XYPosition, Position, SnapGrid, Element, Dimensions, XYZPosition } from './flow'
import { HandleElement, ValidConnectionFunc } from './components'
export type CoordinateExtent = [[number, number], [number, number]]
export interface VFInternals {
isDragging?: boolean
width: number
height: number
export interface VFInternals extends Dimensions {
handleBounds: {
source?: HandleElement[]
target?: HandleElement[]
}
parentNode?: any
isParent?: boolean
position: XYZPosition
}
export type Draggable = Omit<DraggableOptions, 'scale' | 'grid' | 'enableUserSelectHack' | 'enableTransformFix'> | boolean
@@ -33,6 +33,8 @@ export interface Node<T = any> extends Element<T> {
export interface GraphNode<T = any> extends Node<T> {
__vf: VFInternals
selected?: boolean
dragging?: boolean
}
export interface NodeProps<T = any> extends GraphNode {