Skip to content

Commit f08c103

Browse files
authored
resolves playback button issue (sugarlabs#4575)
1 parent 90abbfd commit f08c103

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

js/widgets/temperament.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,28 @@ function TemperamentWidget() {
20932093
} else {
20942094
that.inbetween = true;
20952095
}
2096+
if(!that.playbackForward && i == -1){
2097+
cell.innerHTML =
2098+
`&nbsp;&nbsp;<img
2099+
src="header-icons/play-button.svg"
2100+
title="${_("Play")}"
2101+
alt="${_("Play")}"
2102+
height="${ICONSIZE}"
2103+
width="${ICONSIZE}"
2104+
vertical-align="middle"
2105+
align-content="center"
2106+
>&nbsp;&nbsp;`;
2107+
that._playing = false;
2108+
that.playbackForward = true;
2109+
this.inbetween = false;
2110+
setTimeout(function () {
2111+
that.notesCircle.navItems[0].fillAttr = "#c8C8C8";
2112+
that.notesCircle.navItems[0].sliceHoverAttr.fill = "#c8C8C8";
2113+
that.notesCircle.navItems[0].slicePathAttr.fill = "#c8C8C8";
2114+
that.notesCircle.navItems[0].sliceSelectedAttr.fill = "#c8C8C8";
2115+
that.notesCircle.refreshWheel();
2116+
}, Singer.defaultBPMFactor * 1000 * duration);
2117+
}
20962118
};
20972119
if ((this._playing && currentTime - this.lastClickTime > Singer.defaultBPMFactor * 1000 * duration) || (this.inbetween)) {
20982120
that.playbackForward = true;

0 commit comments

Comments
 (0)