feat(nodes): Allow pre-defined dimensions of a node

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent 47e3336c01
commit 094c4ff9ae
3 changed files with 18 additions and 2 deletions
+2 -1
View File
@@ -35,6 +35,7 @@ export interface Node<Data = ElementData> extends Element<Data> {
expandParent?: boolean
/** define node as a child node by setting a parent node id */
parentNode?: string
dimensions?: Partial<Dimensions>
}
export interface GraphNode<Data = ElementData> extends Node<Data> {
@@ -54,7 +55,7 @@ export interface NodeProps<Data = ElementData> {
/** node DOM-element */
nodeElement: HTMLDivElement
type: string
data: Data
data?: Data
selected: boolean
connectable: boolean
/** absolute position in relation to parent elements + z-index */