Преглед изворни кода

Merge branch 'feature-tianyong' into gym-test

TIANYONG пре 6 месеци
родитељ
комит
f8cb169a9e
3 измењених фајлова са 7 додато и 7 уклоњено
  1. 1 0
      src/page-instrument/evaluat-model/index.tsx
  2. 5 6
      src/state.ts
  3. 1 1
      src/view/selection/index.module.less

+ 1 - 0
src/page-instrument/evaluat-model/index.tsx

@@ -226,6 +226,7 @@ export default defineComponent({
         const end = difftime + (item.sourceRelaEndtime || item.relaEndtime) - starTime;
         const isStaccato = note.noteElement.voiceEntry.isStaccato();
         const noteRate = isStaccato ? 0.5 : 1;
+        debugger
         if (note.formatLyricsEntries.contains("Play") || note.formatLyricsEntries.contains("Play...")) {
           ListenMode = false;
         }

+ 5 - 6
src/state.ts

@@ -685,7 +685,11 @@ const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
 
 // 开始播放时,计算mp3的播放倍率
 export const initSetPlayRate = () => {
-  const item: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
+  let item: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
+  console.log('播放状态',state.playState)
+  if (state.playState === 'paused' && state.sectionStatus && state.section.length === 2 && state.times[state.activeNoteIndex].MeasureNumberXML !== state.section[0].MeasureNumberXML) {
+    item = state.times[state.activeNoteIndex];
+  }
   if (item && item.measureSpeed) {
     const ratio = state.speed / Math.floor(item.measureSpeed)
     // state.audiosInstance?.setSpeed(ratio)
@@ -2308,11 +2312,6 @@ export const resetCursorPosition = () => {
       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')
-        }, 0);
-      }
       currentDot?.classList.add('dotActive')
     } else {
       const currentActives: HTMLElement[] = Array.from(document.querySelectorAll(".dotActive"));

+ 1 - 1
src/view/selection/index.module.less

@@ -205,7 +205,7 @@
     position: relative;
     width: fit-content;
     left: 50%;
-    top: -40px;
+    top: -10px;
     transform: translate(-50%);
     > img {
         width: auto;