From c7a60dfd67918e2b0b0364981c569a264067d8ce Mon Sep 17 00:00:00 2001 From: mattuy Date: Wed, 6 Oct 2021 16:11:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=9F=B3=E7=AC=A6=E7=9A=84=E5=A2=9E=E5=87=8F?= =?UTF-8?q?=E6=97=B6=E7=BA=BF=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/Paragraph/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/view/Paragraph/index.js b/src/view/Paragraph/index.js index 76fa01c..6bfa615 100644 --- a/src/view/Paragraph/index.js +++ b/src/view/Paragraph/index.js @@ -87,14 +87,14 @@ function Paragraph({ paragraph, offsetY, alignJustify }) { // 当前音符可能和下一个音符的增减时线连续,本次循环不绘制 toIndex = i; } - if (i === notations.length - 1) { - // 已是最后一个音符,直接绘制增减时线 - lines.push(renderUnderLine(baseOffsetY, fromIndex, toIndex)); - fromIndex = toIndex = -1; - } } else { fromIndex = toIndex = i; } + if (i === notations.length - 1) { + // 已是最后一个音符,直接绘制增减时线 + lines.push(renderUnderLine(baseOffsetY, fromIndex, toIndex)); + fromIndex = toIndex = -1; + } --helpMap[i]; } else { // 当前音符不需要绘制增减时线