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.
This commit is contained in:
@@ -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(
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user