Browse Source

fix: bug修改

TIANYONG 9 months ago
parent
commit
833a610ca7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/state.ts

+ 4 - 1
src/state.ts

@@ -2290,7 +2290,10 @@ export const resetCursorPosition = () => {
   if (metronomeData.cursorMode === 1) {
     const currentActive = document.querySelector(`.dotActive`);
     currentActive?.classList.remove('dotActive');
-    const currentDot = document.querySelector(`.noteIndex_${state.activeNoteIndex}`)
+    // const currentDot = document.querySelector(`.noteIndex_${state.activeNoteIndex}`)
+    const noteId = state.times[state.activeNoteIndex].id;
+    const domId = "vf" + noteId;
+    const currentDot = document.querySelector(`[data-vf=${domId}]`)?.parentElement
     if (currentDot) {
       setTimeout(() => {
         currentDot.classList.add('dotActive')