liushengqiang 2 年之前
父节点
当前提交
48c9a6f056
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/state.ts

+ 2 - 1
src/state.ts

@@ -349,7 +349,8 @@ const setCursorPosition = (note: any, cursor: any) => {
 		nextTick(() => {
 			const bbox = note.bbox;
 			if (!bbox) return;
-			const width = (bbox.width - 18) / 3;
+			const baseW = state.platform === IPlatform.PC ? 29 : 18;
+			const width = (bbox.width - baseW) / 3;
 			cursor.cursorElement.style.left = bbox.left + "px";
 			cursor.cursorElement.style.transform = `translateX(${width}px)`;
 		});