fix(webui): skip the open-card reframe while the workflow canvas is hidden
This commit is contained in:
1 parent
6c78358c7b
commit
118c0980da
2 files changed
+4
-3
No files matched your search
@@ -252,9 +252,10 @@ watch([() => props.title, () => graph.value.nodes.map((node) => `${node.id}:${no
|
||||
// opened wider than the canvas allows is framed so its edges stay reachable.
|
||||
watch(anchor, async (node) => {
|
||||
await nextTick();
|
||||
if (phone.value || !node || !flow) return;
|
||||
// A hidden canvas has no size to animate across; it is placed when shown.
|
||||
const width = viewport.value?.clientWidth;
|
||||
if (phone.value || !node || !flow || !width) return;
|
||||
const { y } = flow.getViewport();
|
||||
const width = viewport.value?.clientWidth ?? 800;
|
||||
const height = viewport.value?.clientHeight ?? 560;
|
||||
const { x, zoom } = framing(width);
|
||||
const screenTop = (node.position.y + pushed(node.position.y)) * zoom + y;
|
||||
|
||||
Reference in new issue
Block a user