fix: set row margin boundary error

main
zjx-git 2 years ago committed by GitHub
parent f65ff87e44
commit 5285170943
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1188,7 +1188,7 @@ export class Draw {
const { defaultBasicRowMarginHeight, defaultRowMargin, scale } = const { defaultBasicRowMarginHeight, defaultRowMargin, scale } =
this.options this.options
return ( return (
defaultBasicRowMarginHeight * (el.rowMargin || defaultRowMargin) * scale defaultBasicRowMarginHeight * (el.rowMargin ?? defaultRowMargin) * scale
) )
} }
@ -1227,7 +1227,7 @@ export class Draw {
const curRow: IRow = rowList[rowList.length - 1] const curRow: IRow = rowList[rowList.length - 1]
const element = elementList[i] const element = elementList[i]
const rowMargin = const rowMargin =
defaultBasicRowMarginHeight * (element.rowMargin || defaultRowMargin) defaultBasicRowMarginHeight * (element.rowMargin ?? defaultRowMargin)
const metrics: IElementMetrics = { const metrics: IElementMetrics = {
width: 0, width: 0,
height: 0, height: 0,

@ -430,7 +430,7 @@ export class RangeManager {
const color = curElement.color || null const color = curElement.color || null
const highlight = curElement.highlight || null const highlight = curElement.highlight || null
const rowFlex = curElement.rowFlex || null const rowFlex = curElement.rowFlex || null
const rowMargin = curElement.rowMargin || this.options.defaultRowMargin const rowMargin = curElement.rowMargin ?? this.options.defaultRowMargin
const dashArray = curElement.dashArray || [] const dashArray = curElement.dashArray || []
const level = curElement.level || null const level = curElement.level || null
const listType = curElement.listType || null const listType = curElement.listType || null

Loading…
Cancel
Save