fix: float image position boundary error #716

Co-authored-by: Hufe921 <huangyunfeihufe@hotmail.com>
npr765
daria2023 2 years ago committed by GitHub
parent eea301eb11
commit f5113f539c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -643,6 +643,7 @@ export class Position {
payload: IGetFloatPositionByXYPayload
): ICurrentPosition | void {
const { x, y } = payload
const currentPageNo = payload.pageNo ?? this.draw.getPageNo()
const currentZone = this.draw.getZone().getZone()
for (let f = 0; f < this.floatPositionList.length; f++) {
const {
@ -653,9 +654,11 @@ export class Position {
trIndex,
tdIndex,
tdValueIndex,
zone: floatElementZone
zone: floatElementZone,
pageNo
} = this.floatPositionList[f]
if (
currentPageNo === pageNo &&
element.type === ElementType.IMAGE &&
element.imgDisplay === payload.imgDisplay &&
(!floatElementZone || floatElementZone === currentZone)

Loading…
Cancel
Save