|
@@ -1256,6 +1256,7 @@ export const handleSelection = (item: any) => {
|
|
setSection(state.section[0].MeasureNumberXML, state.section[1].MeasureNumberXML)
|
|
setSection(state.section[0].MeasureNumberXML, state.section[1].MeasureNumberXML)
|
|
//state.section = formateSelectMearure(state.section);
|
|
//state.section = formateSelectMearure(state.section);
|
|
closeToast();
|
|
closeToast();
|
|
|
|
+ resetCursorPosition();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (state.section.length === 1) {
|
|
if (state.section.length === 1) {
|
|
@@ -1430,7 +1431,7 @@ const getMusicInfo = async (res: any) => {
|
|
let partIndexs = query["part-index"] ? query["part-index"].split(",") : ["-1"] // -1为partIndex没有值的时候
|
|
let partIndexs = query["part-index"] ? query["part-index"].split(",") : ["-1"] // -1为partIndex没有值的时候
|
|
partIndexs = partIndexs.map((indexStr:string) => {
|
|
partIndexs = partIndexs.map((indexStr:string) => {
|
|
return parseInt(indexStr)
|
|
return parseInt(indexStr)
|
|
- }).sort();
|
|
|
|
|
|
+ }).sort((a, b) => a - b);
|
|
let partIndex = partIndexs[0]
|
|
let partIndex = partIndexs[0]
|
|
// 当partIndexs 大于1个的时候,代表用户自己选择了多个声部,用总谱渲染的逻辑
|
|
// 当partIndexs 大于1个的时候,代表用户自己选择了多个声部,用总谱渲染的逻辑
|
|
if(partIndexs.length > 1){
|
|
if(partIndexs.length > 1){
|
|
@@ -2291,7 +2292,9 @@ export const resetCursorPosition = () => {
|
|
currentActive?.classList.remove('dotActive');
|
|
currentActive?.classList.remove('dotActive');
|
|
const currentDot = document.querySelector(`.noteIndex_${state.activeNoteIndex}`)
|
|
const currentDot = document.querySelector(`.noteIndex_${state.activeNoteIndex}`)
|
|
if (currentDot) {
|
|
if (currentDot) {
|
|
- currentDot.classList.add('dotActive')
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ currentDot.classList.add('dotActive')
|
|
|
|
+ }, 0);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
const currentActive = document.querySelector(`.dotActive`);
|
|
const currentActive = document.querySelector(`.dotActive`);
|