Fix size for collapsed nodes

This commit is contained in:
pythongosssss
2024-01-17 19:39:22 +00:00
parent d6e28949bd
commit b97dc6086f
+3 -2
View File
@@ -14,8 +14,9 @@ class WorkflowImage {
(p, n) => {
if (n.pos[0] < p[0]) p[0] = n.pos[0];
if (n.pos[1] < p[1]) p[1] = n.pos[1];
const r = n.pos[0] + n.size[0];
const b = n.pos[1] + n.size[1];
const bounds = n.getBounding();
const r = n.pos[0] + bounds[2];
const b = n.pos[1] + bounds[3];
if (r > p[2]) p[2] = r;
if (b > p[3]) p[3] = b;
return p;