From c29e0c0eaf74697d5e0db9115abb4610d5d5bc93 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 17 Jan 2014 13:31:51 +0000 Subject: [PATCH] ImageViewer: show overview only when needed --- source/Ox.UI/js/Image/ImageViewer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Image/ImageViewer.js b/source/Ox.UI/js/Image/ImageViewer.js index ba02af8f..a9899032 100644 --- a/source/Ox.UI/js/Image/ImageViewer.js +++ b/source/Ox.UI/js/Image/ImageViewer.js @@ -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() {