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( () =>