浏览代码

fix: 渐变小节问题修复

TIANYONG 10 月之前
父节点
当前提交
787f3a9645
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/helpers/calcSpeed.ts

+ 3 - 3
src/helpers/calcSpeed.ts

@@ -160,13 +160,13 @@ export const getGradualLengthByXml = (xml: string) => {
 	// 结尾处手动插入一个音符节点
 	// 结尾处手动插入一个音符节点
 	eles.push({
 	eles.push({
 		ele: notes[notes.length - 1],
 		ele: notes[notes.length - 1],
-		index: notes.length,
+		index: notes.length-1,
 		noteInMeasureIndex: 0,
 		noteInMeasureIndex: 0,
 		textContent: "",
 		textContent: "",
 		type: "metronome",
 		type: "metronome",
 		allDuration: 1,
 		allDuration: 1,
-		leftDuration: 1,
-		measureIndex: measures.length,
+		leftDuration: 0,
+		measureIndex: measures.length-1,
 	});
 	});
 
 
 	const gradualNotes: GradualNote[] = [];
 	const gradualNotes: GradualNote[] = [];