|
@@ -424,7 +424,14 @@ function calculateMetroStep(arr: any[], m: any): number[] {
|
|
|
if (exceedStep >= 1) {
|
|
|
totalLength -= clap;
|
|
|
// 一拍
|
|
|
- const measure_bbox = item?.svgElement?.attrs?.el?.parentElement?.parentElement?.getBoundingClientRect?.() || { x: 0 };
|
|
|
+ let measure_bbox = item?.svgElement?.attrs?.el?.parentElement?.parentElement?.getBoundingClientRect?.() || { x: 0 };
|
|
|
+ /**
|
|
|
+ * bug: #9875
|
|
|
+ * 简谱,渲染有点问题,先使用vf-stave的位置
|
|
|
+ */
|
|
|
+ if (state.musicRenderType !== "staff") {
|
|
|
+ measure_bbox = item?.svgElement?.attrs?.el?.parentElement?.parentElement?.querySelector('.vf-stave')?.getBoundingClientRect?.() || { x: 0 };
|
|
|
+ }
|
|
|
if (notes.length > 0) {
|
|
|
let bbox = notes[0]?.svgElement?.attrs?.el?.getBoundingClientRect?.() || { x: 0 };
|
|
|
let x: any = bbox.x - measure_bbox.x;
|