fix: float image position boundary error #716
Co-authored-by: Hufe921 <huangyunfeihufe@hotmail.com>
This commit is contained in:
@@ -643,6 +643,7 @@ export class Position {
|
|||||||
payload: IGetFloatPositionByXYPayload
|
payload: IGetFloatPositionByXYPayload
|
||||||
): ICurrentPosition | void {
|
): ICurrentPosition | void {
|
||||||
const { x, y } = payload
|
const { x, y } = payload
|
||||||
|
const currentPageNo = payload.pageNo ?? this.draw.getPageNo()
|
||||||
const currentZone = this.draw.getZone().getZone()
|
const currentZone = this.draw.getZone().getZone()
|
||||||
for (let f = 0; f < this.floatPositionList.length; f++) {
|
for (let f = 0; f < this.floatPositionList.length; f++) {
|
||||||
const {
|
const {
|
||||||
@@ -653,9 +654,11 @@ export class Position {
|
|||||||
trIndex,
|
trIndex,
|
||||||
tdIndex,
|
tdIndex,
|
||||||
tdValueIndex,
|
tdValueIndex,
|
||||||
zone: floatElementZone
|
zone: floatElementZone,
|
||||||
|
pageNo
|
||||||
} = this.floatPositionList[f]
|
} = this.floatPositionList[f]
|
||||||
if (
|
if (
|
||||||
|
currentPageNo === pageNo &&
|
||||||
element.type === ElementType.IMAGE &&
|
element.type === ElementType.IMAGE &&
|
||||||
element.imgDisplay === payload.imgDisplay &&
|
element.imgDisplay === payload.imgDisplay &&
|
||||||
(!floatElementZone || floatElementZone === currentZone)
|
(!floatElementZone || floatElementZone === currentZone)
|
||||||
|
|||||||
Reference in New Issue
Block a user