TIANYONG 9 miesięcy temu
rodzic
commit
833a610ca7
1 zmienionych plików z 4 dodań i 1 usunięć
  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')