Skip to content

Commit 90abbfd

Browse files
authored
Ensure nodes play properly in circular mode. (#4570)
* Ensure nodes play properly in circular mode. * fixed lint warnings
1 parent 893603a commit 90abbfd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/widgets/temperament.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,9 +2097,13 @@ function TemperamentWidget() {
20972097
if ((this._playing && currentTime - this.lastClickTime > Singer.defaultBPMFactor * 1000 * duration) || (this.inbetween)) {
20982098
that.playbackForward = true;
20992099
this.inbetween = false;
2100-
for (let i = 0; i <= this.pitchNumber; i++) {
2101-
docById("pitchNumber_" + i).style.background = platformColor.selectorBackground;
2100+
if (this.circleIsVisible) {
2101+
for (let i = 0; i <= this.pitchNumber; i++) {
2102+
const pitchElement = docById("pitchNumber_" + i);
2103+
pitchElement.style.background = platformColor.selectorBackground;
2104+
}
21022105
}
2106+
21032107
__playLoop(0);
21042108
}
21052109
this.lastClickTime = currentTime;

0 commit comments

Comments
 (0)