Skip to content

Commit

Permalink
Temporarily disable the Spread mode buttons when horizontal scrolling…
Browse files Browse the repository at this point in the history
… is enabled

Given that the non-default Spread modes (currently) doesn't affect the page layout when horizontal scrolling is enabled, having the Spread buttons appear active when clicking them appears to do *nothing* is probably confusing rather than helpful to users.
  • Loading branch information
Snuffleupagus committed Jul 8, 2018
1 parent c4fa38a commit 3f40cc2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/secondary_toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ class SecondaryToolbar {
buttons.scrollWrappedButton.classList.add('toggled');
break;
}

// Temporarily *disable* the Spread buttons when horizontal scrolling is
// enabled, since the non-default Spread modes doesn't affect the layout.
const isScrollModeHorizontal = (evt.mode === ScrollMode.HORIZONTAL);
buttons.spreadNoneButton.disabled = isScrollModeHorizontal;
buttons.spreadOddButton.disabled = isScrollModeHorizontal;
buttons.spreadEvenButton.disabled = isScrollModeHorizontal;
}
this.eventBus.on('scrollmodechanged', scrollModeChanged);

Expand Down

0 comments on commit 3f40cc2

Please sign in to comment.