fix: export HTML block elements row flex error #598

This commit is contained in:
Hufe921
2024-05-25 21:42:15 +08:00
parent 7fa58f8290
commit 4cd18c8c65
3 changed files with 49 additions and 21 deletions
+3 -3
View File
@@ -64,7 +64,7 @@ import {
} from '../../dataset/enum/Editor'
import { Control } from './control/Control'
import {
getIsInlineElement,
getIsBlockElement,
getSlimCloneElementList,
zipElementList
} from '../../utils/element'
@@ -1642,8 +1642,8 @@ export class Draw {
rowList.push(row)
} else {
curRow.width += metrics.width
// 减小行元素前第一行空行行高
if (i === 0 && getIsInlineElement(elementList[1])) {
// 减小块元素前第一行空行行高
if (i === 0 && getIsBlockElement(elementList[1])) {
curRow.height = defaultBasicRowMarginHeight
curRow.ascent = defaultBasicRowMarginHeight
} else if (curRow.height < height) {