fix: image element row margin error

This commit is contained in:
Hufe921
2023-04-22 15:50:11 +08:00
parent 59065bb29e
commit 3daacc6cb8
+1 -1
View File
@@ -1025,7 +1025,7 @@ export class Draw {
} }
const ascent = (element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE) || const ascent = (element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE) ||
element.type === ElementType.LATEX element.type === ElementType.LATEX
? metrics.height ? metrics.height + rowMargin
: metrics.boundingBoxAscent + rowMargin : metrics.boundingBoxAscent + rowMargin
const height = rowMargin + metrics.boundingBoxAscent + metrics.boundingBoxDescent + rowMargin const height = rowMargin + metrics.boundingBoxAscent + metrics.boundingBoxDescent + rowMargin
const rowElement: IRowElement = Object.assign(element, { const rowElement: IRowElement = Object.assign(element, {