Skip to content

Commit

Permalink
Make scroll-up enlarge the font, not scroll-down
Browse files Browse the repository at this point in the history
  • Loading branch information
OfekShilon committed Jul 15, 2024
1 parent 337242a commit a7f3ce2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/widgets/fontscale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ function makeFontSizeDropdown(elem: JQuery, obj: FontScale, buttonDropdown: JQue
buttonDropdown.on('wheel', (e: any) => {
e.preventDefault();
let selectedId = elem.find('.active').index();
if (e.originalEvent.deltaY >= 0 && selectedId < elem.children().length - 1) {
if (e.originalEvent.deltaY < 0 && selectedId < elem.children().length - 1) {
selectedId++;
} else if (e.originalEvent.deltaY < 0 && selectedId > 0) {
} else if (e.originalEvent.deltaY >= 0 && selectedId > 0) {
selectedId--;
}
elem.children().eq(selectedId).trigger('click');
Expand Down

0 comments on commit a7f3ce2

Please sign in to comment.