Skip to content

Commit

Permalink
feat:paging cursor position
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Mar 18, 2023
1 parent ed79d25 commit 7b4b33b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/editor/core/cursor/Cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b4b33b

Please sign in to comment.