|
@@ -137,8 +137,9 @@ export default defineComponent({
|
|
|
} catch (error) {}
|
|
|
|
|
|
const staveBbox = staveEle?.getBoundingClientRect?.() || { x: 0, width: 0, y: 0, height: 0 };
|
|
|
- const timesignatureDom = staveEle?.querySelector('.vf-timesignature')
|
|
|
- if (timesignatureDom) {
|
|
|
+ const timesignatureDom = staveEle?.querySelector('.vf-timesignature') || staveEle?.querySelector('.vf-keysignature')
|
|
|
+ // 休止符才是根据小节宽度等分
|
|
|
+ if (timesignatureDom && item.measures.length == 1) {
|
|
|
const timesignatureBbox = timesignatureDom.getBoundingClientRect()
|
|
|
const leftWidth = timesignatureBbox.x + timesignatureBbox.width - staveBbox.x
|
|
|
beatLeft = leftWidth
|
|
@@ -330,7 +331,7 @@ export default defineComponent({
|
|
|
metronomeData.cursorMode === 2 &&
|
|
|
item.MeasureNumberXML === metronomeData.activeMetro?.measureNumberXML &&
|
|
|
state.times[state.activeNoteIndex].MeasureNumberXML === item.MeasureNumberXML;
|
|
|
- //console.log('显示节拍指针',lineShow,state.times[state.activeNoteIndex].MeasureNumberXML,item.MeasureNumberXML,metronomeData.activeMetro?.measureNumberXML)
|
|
|
+ // console.log('显示节拍指针',lineShow,state.times[state.activeNoteIndex].MeasureNumberXML,item.MeasureNumberXML,metronomeData.activeMetro?.measureNumberXML)
|
|
|
return (
|
|
|
<>
|
|
|
{item.staveBox && (
|
|
@@ -353,7 +354,7 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
{lineShow && (
|
|
|
- <div style={{height: selectData.measureHeight + 'px', position: 'relative', width: beatMeasureWidths[item.MeasureNumberXML].beatWidth, left: beatMeasureWidths[item.MeasureNumberXML].beatLeft + 'px'}}>
|
|
|
+ <div style={{height: selectData.measureHeight + 'px', position: 'relative', width: metronomeData.activeMetro.isPercent ? beatMeasureWidths[item.MeasureNumberXML].beatWidth : '100%', left: metronomeData.activeMetro.isPercent ? beatMeasureWidths[item.MeasureNumberXML].beatLeft + 'px' : 0}}>
|
|
|
<div
|
|
|
class={[
|
|
|
styles.line,
|