From c66f13c1c512cdb4e39b02c33987d57a1a8a168e Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Thu, 2 Jul 2026 18:38:28 +0200 Subject: [PATCH] fix: composition map viewBox clipped last row Height was derived from the capabilities column only; the functions column (52px step) is taller and its last box + column labels fell outside the viewBox. Size to the taller column plus label room. --- src/components/CompositionMap.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/CompositionMap.vue b/src/components/CompositionMap.vue index 3fb89c6..05444aa 100644 --- a/src/components/CompositionMap.vue +++ b/src/components/CompositionMap.vue @@ -26,7 +26,14 @@ const rstep = 52 const capY = (i: number) => top + i * lstep + bh / 2 const funcY = (i: number) => top + i * rstep + bh / 2 -const H = computed(() => top + props.composition.caps.length * lstep + 16) +// viewBox height must fit whichever column is taller — the functions column +// (rstep = 52) usually outruns the capabilities column (lstep = 40) — plus room +// for the bottom labels. Sizing off caps.length alone clipped the last row. +const H = computed(() => { + const leftBottom = top + (props.composition.caps.length - 1) * lstep + bh + const rightBottom = top + (props.composition.funcs.length - 1) * rstep + bh + return Math.max(leftBottom, rightBottom) + 26 +}) const capIndex = computed( () =>