|
@@ -302,6 +302,7 @@ export default defineComponent({
|
|
|
const start = data.multiSelectList[0];
|
|
|
const end = data.multiSelectList[1];
|
|
|
const list = [] as any[];
|
|
|
+ console.log("🚀 ~ start:", start.noteIndex, end.noteIndex);
|
|
|
for (let i = start.measureIndex; i < end.measureIndex + 1; i++) {
|
|
|
const measure = abcData.abc.measures[i];
|
|
|
for (let j = 0; j < measure.notes.length; j++) {
|
|
@@ -311,12 +312,16 @@ export default defineComponent({
|
|
|
measureIndex: i,
|
|
|
noteIndex: j,
|
|
|
};
|
|
|
- if (start.measureIndex === i) {
|
|
|
- j >= start.noteIndex && list.push(active);
|
|
|
- } else if (i === end.measureIndex) {
|
|
|
- j <= end.noteIndex && list.push(active);
|
|
|
+ if (start.measureIndex != end.measureIndex) {
|
|
|
+ if (start.measureIndex === i) {
|
|
|
+ j >= start.noteIndex && list.push(active);
|
|
|
+ } else if (i === end.measureIndex) {
|
|
|
+ j <= end.noteIndex && list.push(active);
|
|
|
+ } else {
|
|
|
+ list.push(active);
|
|
|
+ }
|
|
|
} else {
|
|
|
- list.push(active);
|
|
|
+ j >= start.noteIndex && j <= end.noteIndex && list.push(active);
|
|
|
}
|
|
|
}
|
|
|
}
|