fix: 修复最后一个音符的增减时线不显示的问题
This commit is contained in:
@@ -87,14 +87,14 @@ function Paragraph({ paragraph, offsetY, alignJustify }) {
|
|||||||
// 当前音符可能和下一个音符的增减时线连续,本次循环不绘制
|
// 当前音符可能和下一个音符的增减时线连续,本次循环不绘制
|
||||||
toIndex = i;
|
toIndex = i;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
fromIndex = toIndex = i;
|
||||||
|
}
|
||||||
if (i === notations.length - 1) {
|
if (i === notations.length - 1) {
|
||||||
// 已是最后一个音符,直接绘制增减时线
|
// 已是最后一个音符,直接绘制增减时线
|
||||||
lines.push(renderUnderLine(baseOffsetY, fromIndex, toIndex));
|
lines.push(renderUnderLine(baseOffsetY, fromIndex, toIndex));
|
||||||
fromIndex = toIndex = -1;
|
fromIndex = toIndex = -1;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
fromIndex = toIndex = i;
|
|
||||||
}
|
|
||||||
--helpMap[i];
|
--helpMap[i];
|
||||||
} else {
|
} else {
|
||||||
// 当前音符不需要绘制增减时线
|
// 当前音符不需要绘制增减时线
|
||||||
|
|||||||
Reference in New Issue
Block a user