|
@@ -122,35 +122,38 @@ export default defineComponent({
|
|
|
const activeTimeNote = state.times[activeIndex]
|
|
|
const activeNote = activeTimeNote.noteElement
|
|
|
const measureListIndex = activeNote.sourceMeasure.measureListIndex
|
|
|
- if (index === 0 && measureListIndex !== 0 && !state.needTick) {
|
|
|
- const firstNote = getFirsrNoteByMeasureListIndex(measureListIndex - 1)
|
|
|
- const fnote = firstNote?.noteElement
|
|
|
- if (fnote) {
|
|
|
- // console.log(fnote.sourceMeasure?.measureListIndex, start.noteElement?.sourceMeasure?.measureListIndex)
|
|
|
- for (
|
|
|
- let j = fnote.sourceMeasure?.measureListIndex;
|
|
|
- j < start.noteElement?.sourceMeasure?.measureListIndex;
|
|
|
- j++
|
|
|
- ) {
|
|
|
- if (!seteds.includes(j)) {
|
|
|
- for (const item of state.times) {
|
|
|
- if (item.noteElement?.sourceMeasure?.measureListIndex === j && !seteds.includes(j)) {
|
|
|
- const boundingBox = this.getBoundingBoxByNote(item.noteElement, {
|
|
|
- before: true,
|
|
|
- })
|
|
|
- state.befireSection = item
|
|
|
- if (!boundingBox) {
|
|
|
- continue
|
|
|
- }
|
|
|
- state.sectionBoundingBoxs.push(boundingBox)
|
|
|
- heights.push(boundingBox.height)
|
|
|
- seteds.push(j)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ // 如果没有节拍器,默认提前一个小节
|
|
|
+ // if (index === 0 && measureListIndex !== 0 && !state.needTick) {
|
|
|
+ // const firstNote = getFirsrNoteByMeasureListIndex(measureListIndex - 1)
|
|
|
+ // const fnote = firstNote?.noteElement
|
|
|
+ // if (fnote) {
|
|
|
+ // // console.log(fnote.sourceMeasure?.measureListIndex, start.noteElement?.sourceMeasure?.measureListIndex)
|
|
|
+ // for (
|
|
|
+ // let j = fnote.sourceMeasure?.measureListIndex;
|
|
|
+ // j < start.noteElement?.sourceMeasure?.measureListIndex;
|
|
|
+ // j++
|
|
|
+ // ) {
|
|
|
+ // if (!seteds.includes(j)) {
|
|
|
+ // for (const item of state.times) {
|
|
|
+ // if (item.noteElement?.sourceMeasure?.measureListIndex === j && !seteds.includes(j)) {
|
|
|
+ // const boundingBox = this.getBoundingBoxByNote(item.noteElement, {
|
|
|
+ // before: true,
|
|
|
+ // })
|
|
|
+ // state.befireSection = item
|
|
|
+ // if (!boundingBox) {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // state.sectionBoundingBoxs.push(boundingBox)
|
|
|
+ // heights.push(boundingBox.height)
|
|
|
+ // seteds.push(j)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
if (!seteds.includes(measureListIndex)) {
|
|
|
seteds.push(measureListIndex)
|
|
|
const boundingBox = this.getBoundingBoxByNote(activeNote)
|