Only update the max-height of the SecondaryToolbar when it's actually visible

There's really no good reason to attempt to adjust the `max-height` of the `SecondaryToolbar` when it's not visible, so let's not do that anymore.
Also, we can listen for the `resize` event in `SecondaryToolbar`, to avoid having to manually call the `max-height` adjust function from various event handlers in `app.js`. Please note that by always adjusting the `max-height` when the toolbar is opened we no longer need the `localized` event, since it was mainly used to set a correct inital `max-height` value.
This commit is contained in:
Jonas Jenwald 2016-09-08 12:35:49 +02:00
parent ca61ccc533
commit 6e126b31dc
3 changed files with 30 additions and 22 deletions

View file

@ -79,6 +79,8 @@ function getViewerConfiguration() {
secondaryToolbar: {
toolbar: document.getElementById('secondaryToolbar'),
toggleButton: document.getElementById('secondaryToolbarToggle'),
toolbarButtonContainer:
document.getElementById('secondaryToolbarButtonContainer'),
presentationModeButton:
document.getElementById('secondaryPresentationMode'),
openFileButton: document.getElementById('secondaryOpenFile'),