refactor(libs) add width, height and positionAbsolute props to NodeProps

This commit is contained in:
moklick
2023-11-23 13:50:28 +01:00
parent 38b5051179
commit 1dfff1bf5b
16 changed files with 63 additions and 49 deletions
+2 -2
View File
@@ -254,8 +254,8 @@ export function calcNextPosition<NodeType extends NodeBase>(
? [
[parentPos.x + nodeWidth * currNodeOrigin[0], parentPos.y + nodeHeight * currNodeOrigin[1]],
[
parentPos.x + parentNode.computed.width - nodeWidth + nodeWidth * currNodeOrigin[0],
parentPos.y + parentNode.computed.height - nodeHeight + nodeHeight * currNodeOrigin[1],
parentPos.x + (parentNode.computed?.width ?? 0) - nodeWidth + nodeWidth * currNodeOrigin[0],
parentPos.y + (parentNode.computed?.height ?? 0) - nodeHeight + nodeHeight * currNodeOrigin[1],
],
]
: currentExtent;