fix: resizer position error when crossing pages #591

This commit is contained in:
Hufe921
2024-05-21 22:49:34 +08:00
parent 28596c889f
commit f4dd90bbc5
@@ -71,7 +71,8 @@ export class Previewer {
let y = 0 let y = 0
const height = this.draw.getHeight() const height = this.draw.getHeight()
const pageGap = this.draw.getPageGap() const pageGap = this.draw.getPageGap()
const preY = this.draw.getPageNo() * (height + pageGap) const pageNo = position?.pageNo ?? this.draw.getPageNo()
const preY = pageNo * (height + pageGap)
// 优先使用浮动位置 // 优先使用浮动位置
if (element.imgFloatPosition) { if (element.imgFloatPosition) {
x = element.imgFloatPosition.x! x = element.imgFloatPosition.x!