ImageViewer: show overview only when needed

This commit is contained in:
rolux 2014-01-17 13:31:51 +00:00
parent bd46effadf
commit c29e0c0eaf

View file

@ -500,7 +500,7 @@ Ox.ImageViewer = function(options, self) {
self.$image.css(getImageCSS());
self.$overlay.css(getOverlayCSS());
}
updateButtons();
updateInterface();
showInterface();
hideInterface();
}
@ -536,7 +536,7 @@ Ox.ImageViewer = function(options, self) {
}
}
function updateButtons() {
function updateInterface() {
self.$scaleButton[
self.zoom == self.fitZoom ? 'disableButton' : 'enableButton'
]('fit');
@ -555,6 +555,9 @@ Ox.ImageViewer = function(options, self) {
self.$zoomButton[
self.zoom == self.maxZoom ? 'disableButton' : 'enableButton'
]('in');
self.$overview[
self.zoom == self.fitZoom ? 'hide' : 'show'
]();
}
function updateSize() {