Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bug in Arbitrary Edit Tab and improvements in Tempo Widget. #2807

Merged
merged 3 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions js/widgets/temperament.js
Original file line number Diff line number Diff line change
Expand Up @@ -1464,9 +1464,11 @@ class TemperamentWidget {
docById("wheelDiv3").style.zIndex = 10;
docById("wheelDiv3").style.marginTop = 15 + "px";
docById("wheelDiv3").style.marginLeft = 37 + "px";
docById("wheelDiv3").addEventListener("mouseover", (e) => {
this.arbitraryEditSlider(e, angle1, ratios, pitchNumber);
});
setTimeout(() => {
docById("wheelDiv3").addEventListener("mouseover", (e) => {
this.arbitraryEditSlider(e, angle1, ratios, pitchNumber);
});
},1500);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you decide on this value: 1500ms?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Through trial and error.
I tried reducing 50ms from 2000ms and on the 1400ms mark, I felt it could show the "noteInfo" just before the whole animation could complete.
Thus, decided on the value of 1500ms.

};

this._createOuterWheel();
Expand Down
10 changes: 6 additions & 4 deletions js/widgets/tempo.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class Tempo {
this.pause();
pauseBtn.innerHTML =
'<img src="header-icons/play-button.svg" title="' +
_("Pause") +
_("Play") +
'" alt="' +
_("Pause") +
_("Play") +
'" height="' +
Tempo.ICONSIZE +
'" width="' +
Expand All @@ -92,9 +92,9 @@ class Tempo {
this.resume();
pauseBtn.innerHTML =
'<img src="header-icons/pause-button.svg" title="' +
_("Play") +
_("Pause") +
'" alt="' +
_("Play") +
_("Pause") +
'" height="' +
Tempo.ICONSIZE +
'" width="' +
Expand Down Expand Up @@ -275,6 +275,7 @@ class Tempo {
this.BPMs[i] = parseFloat(this.BPMs[i]) + Math.round(0.1 * this.BPMs[i]);

if (this.BPMs[i] > 1000) {
logo.errorMsg(_("The beats per minute must be below 1000."));
this.BPMs[i] = 1000;
}

Expand All @@ -290,6 +291,7 @@ class Tempo {
slowDown(i) {
this.BPMs[i] = parseFloat(this.BPMs[i]) - Math.round(0.1 * this.BPMs[i]);
if (this.BPMs[i] < 30) {
logo.errorMsg(_("The beats per minute must be above 30"));
this.BPMs[i] = 30;
}

Expand Down