fix: inline image ascent value

This commit is contained in:
Hufe921
2023-04-21 22:04:38 +08:00
parent e8f61d9d15
commit 59065bb29e
+2 -1
View File
@@ -1023,7 +1023,8 @@ export class Draw {
metrics.boundingBoxDescent += metrics.height / 2
}
}
const ascent = element.type === ElementType.IMAGE || element.type === ElementType.LATEX
const ascent = (element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE) ||
element.type === ElementType.LATEX
? metrics.height
: metrics.boundingBoxAscent + rowMargin
const height = rowMargin + metrics.boundingBoxAscent + metrics.boundingBoxDescent + rowMargin