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
+3 -3
View File
@@ -172,8 +172,8 @@ export const parseNode = (node: Node, nodeExtent: NodeExtent): Node => ({
type: node.type || 'default',
__vf: {
position: clampPosition(node.position, nodeExtent),
width: undefined,
height: undefined,
width: 0,
height: 0,
handleBounds: {},
isDragging: false,
},
@@ -215,7 +215,7 @@ export const getBoundsofRects = (rect1: Rect, rect2: Rect): Rect =>
export const getRectOfNodes = (nodes: Node[]): Rect => {
const box = nodes.reduce(
(currBox, { __vf: { position, width, height } = {} }) =>
(currBox, { __vf: { position = { x: 0, y: 0 }, width = 0, height = 0 } = {} }) =>
getBoundsOfBoxes(
currBox,
rectToBox({