Ver Fonte

兼容PC

liushengqiang há 2 anos atrás
pai
commit
48c9a6f056
1 ficheiros alterados com 2 adições e 1 exclusões
  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)`;
 		});