|
|
|
|
@ -40,7 +40,7 @@ import { Control } from './control/Control'
|
|
|
|
|
import { zipElementList } from '../../utils/element'
|
|
|
|
|
import { CheckboxParticle } from './particle/CheckboxParticle'
|
|
|
|
|
import { DeepRequired } from '../../interface/Common'
|
|
|
|
|
import { ControlComponent } from '../../dataset/enum/Control'
|
|
|
|
|
import { ControlComponent, ImageDisplay } from '../../dataset/enum/Control'
|
|
|
|
|
import { formatElementList } from '../../utils/element'
|
|
|
|
|
import { WorkerManager } from '../worker/WorkerManager'
|
|
|
|
|
import { Previewer } from './particle/previewer/Previewer'
|
|
|
|
|
@ -733,7 +733,9 @@ export class Draw {
|
|
|
|
|
// 超过限定宽度
|
|
|
|
|
const preElement = elementList[i - 1]
|
|
|
|
|
if (
|
|
|
|
|
(preElement && preElement.type === ElementType.TABLE)
|
|
|
|
|
preElement?.type === ElementType.TABLE
|
|
|
|
|
|| preElement?.imgDisplay === ImageDisplay.INLINE
|
|
|
|
|
|| element.imgDisplay === ImageDisplay.INLINE
|
|
|
|
|
|| curRow.width + metrics.width > innerWidth
|
|
|
|
|
|| (i !== 0 && element.value === ZERO)
|
|
|
|
|
) {
|
|
|
|
|
@ -793,9 +795,11 @@ export class Draw {
|
|
|
|
|
for (let j = 0; j < curRow.elementList.length; j++) {
|
|
|
|
|
const element = curRow.elementList[j]
|
|
|
|
|
const metrics = element.metrics
|
|
|
|
|
const offsetY = element.type === ElementType.IMAGE || element.type === ElementType.LATEX
|
|
|
|
|
? curRow.ascent - metrics.height
|
|
|
|
|
: curRow.ascent
|
|
|
|
|
const offsetY =
|
|
|
|
|
(element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE)
|
|
|
|
|
|| element.type === ElementType.LATEX
|
|
|
|
|
? curRow.ascent - metrics.height
|
|
|
|
|
: curRow.ascent
|
|
|
|
|
const positionItem: IElementPosition = {
|
|
|
|
|
pageNo,
|
|
|
|
|
index,
|
|
|
|
|
|