feat:paging cursor position

This commit is contained in:
Hufe921
2023-03-18 17:22:35 +08:00
parent ed79d2587c
commit 7b4b33b5c5
+3 -2
View File
@@ -62,8 +62,9 @@ export class Cursor {
// 设置光标代理
const height = this.draw.getHeight()
const pageGap = this.draw.getPageGap()
const { metrics, coordinate: { leftTop, rightTop }, ascent } = cursorPosition
const curPageNo = this.draw.getPageNo()
const { metrics, coordinate: { leftTop, rightTop }, ascent, pageNo } = cursorPosition
const zoneManager = this.draw.getZone()
const curPageNo = zoneManager.isMainActive() ? pageNo : this.draw.getPageNo()
const preY = curPageNo * (height + pageGap)
// 增加1/4字体大小
const offsetHeight = metrics.height / 4