fix(svelte): node toolbar for subflows

This commit is contained in:
moklick
2024-05-06 15:50:41 +02:00
parent 9cf09651a6
commit fb30b81cb4
3 changed files with 6 additions and 13 deletions
@@ -42,18 +42,7 @@
}
$: {
let nodeRect: Rect | undefined = undefined;
if (toolbarNodes.length === 1) {
const toolbarNode = toolbarNodes[0];
nodeRect = {
...toolbarNode.position,
width: toolbarNode.measured.width ?? toolbarNode.width ?? 0,
height: toolbarNode.measured.height ?? toolbarNode.height ?? 0
};
} else if (toolbarNodes.length > 1) {
nodeRect = getNodesBounds(toolbarNodes, { nodeOrigin: $nodeOrigin });
}
const nodeRect = getNodesBounds(toolbarNodes, { nodeOrigin: $nodeOrigin });
if (nodeRect) {
transform = getNodeToolbarTransform(nodeRect, $viewport, _position, _offset, _align);