feat(nodes): Add dimensions to nodeprops
This commit is contained in:
@@ -157,6 +157,7 @@ export default {
|
|||||||
isConnectable: props.connectable,
|
isConnectable: props.connectable,
|
||||||
position: node.position,
|
position: node.position,
|
||||||
computedPosition: node.computedPosition,
|
computedPosition: node.computedPosition,
|
||||||
|
dimensions: node.dimensions,
|
||||||
isValidTargetPos: node.isValidTargetPos,
|
isValidTargetPos: node.isValidTargetPos,
|
||||||
isValidSourcePos: node.isValidSourcePos,
|
isValidSourcePos: node.isValidSourcePos,
|
||||||
parentNode: node.parentNode ? node.parentNode.id : undefined,
|
parentNode: node.parentNode ? node.parentNode.id : undefined,
|
||||||
@@ -179,6 +180,7 @@ export default {
|
|||||||
connectable: props.connectable,
|
connectable: props.connectable,
|
||||||
position: node.position,
|
position: node.position,
|
||||||
computedPosition: node.computedPosition,
|
computedPosition: node.computedPosition,
|
||||||
|
dimensions: node.dimensions,
|
||||||
isValidTargetPos: node.isValidTargetPos,
|
isValidTargetPos: node.isValidTargetPos,
|
||||||
isValidSourcePos: node.isValidSourcePos,
|
isValidSourcePos: node.isValidSourcePos,
|
||||||
parentNode: node.parentNode ? node.parentNode.id : undefined,
|
parentNode: node.parentNode ? node.parentNode.id : undefined,
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ export interface NodeProps<T = any> {
|
|||||||
computedPosition: XYZPosition
|
computedPosition: XYZPosition
|
||||||
/** x and y position on the graph */
|
/** x and y position on the graph */
|
||||||
position: XYPosition
|
position: XYPosition
|
||||||
|
/** node dimensions (width, height) */
|
||||||
|
dimensions: Dimensions
|
||||||
label?:
|
label?:
|
||||||
| string
|
| string
|
||||||
| {
|
| {
|
||||||
|
|||||||
Reference in New Issue
Block a user