Browse Source

Merge branch 'feature-tianyong-newVersion' into ktyq-test-new

TIANYONG 1 week ago
parent
commit
d881c88967
2 changed files with 14 additions and 3 deletions
  1. 7 2
      src/page-instrument/custom-plugins/guide-driver/index.tsx
  2. 7 1
      src/state.ts

+ 7 - 2
src/page-instrument/custom-plugins/guide-driver/index.tsx

@@ -1444,13 +1444,18 @@ export const EvaluatingReportDriver = defineComponent({
             title: "",
             description: "",
             popoverClass: "popoverClass popoverClassReport3 popoverClose",
-            align: "start",
+            align: "end",
             side: "bottom",
             prevBtnText: "再看一遍",
             doneBtnText: "完成",
             showButtons: ["next", "previous"],
             onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
-              driverInitialPosition(popover, options);
+              options.config.stageRadius = 8;
+              options.config.stagePadding = 5;
+              try {
+                const rect = options.state.activeElement?.getBoundingClientRect();
+                popover.wrapper.style.marginLeft = ((rect?.width || 0) / 2) * -1 + 4 + "px";
+              } catch {}
             },
             onPrevClick: () => {
               driverObj.drive(0);

+ 7 - 1
src/state.ts

@@ -425,7 +425,13 @@ export const onPlay = () => {
 const autoResetPlay = () => {
   // 作业模式,出现作业提交弹窗时,不进行自动重播逻辑
   if (state.modeType !== "practise" || state.showWorkDonePop) return;
-  skipNotePlay(0, true);
+  // 如果是midi的曲子,并且有选段,重置到预备小节的位置
+  if (state.isAppPlay && state.section.length === 2) {
+    const startItemINdex = state.sectionFirst ? state.sectionFirst.i : state.section[1].i;
+    skipNotePlay(startItemINdex, true);
+  } else {
+    skipNotePlay(0, true);
+  }
   // 没有开启自动重播, 不是练习模式
   if (!state.setting.repeatAutoPlay) return;
   offsetTop = 0;