Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-07-25 22:44:23 +0300
committerOlivier Paroz <github@oparoz.com>2015-07-25 22:44:23 +0300
commit49131955ff7e0c466ee00178cd7650aa3e4e7ac5 (patch)
tree2c8d318c8e6e0c9222964b9fe41f68f57ff9e5b8 /js/slideshowzoomablepreview.js
parent1be509d847380f49c6c2052f937c25b1c5d7ff6a (diff)
Support IE8 in the slideshow
Diffstat (limited to 'js/slideshowzoomablepreview.js')
-rw-r--r--js/slideshowzoomablepreview.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/js/slideshowzoomablepreview.js b/js/slideshowzoomablepreview.js
index f2069761..1db69472 100644
--- a/js/slideshowzoomablepreview.js
+++ b/js/slideshowzoomablepreview.js
@@ -30,6 +30,7 @@
fullScreen: null,
canFullScreen: false,
currentImage: null,
+ mimeType: null,
maxZoom: 3,
smallImageDimension: 200 / window.devicePixelRatio,
smallImageScale: 2,
@@ -39,9 +40,11 @@
*
* @param image
* @param currentImage
+ * @param {string} mimeType
*/
- startBigshot: function (image, currentImage) {
+ startBigshot: function (image, currentImage, mimeType) {
this.currentImage = currentImage;
+ this.mimeType = mimeType;
if (this.zoomable !== null) {
this.zoomable.dispose();
this.zoomable = null;
@@ -51,7 +54,7 @@
var imgHeight = image.naturalHeight / window.devicePixelRatio;
if (imgWidth < this.smallImageDimension &&
imgHeight < this.smallImageDimension &&
- this.currentImage.mimeType !== 'image/svg+xml') {
+ this.mimeType !== 'image/svg+xml') {
maxZoom += 3;
this.currentImage.isSmallImage = true;
}
@@ -177,7 +180,7 @@
*/
_zoomDecider: function () {
if (this.zoomable !== null) {
- if (this.fullScreen === null && this.currentImage.mimeType !== 'image/svg+xml') {
+ if (this.fullScreen === null && this.mimeType !== 'image/svg+xml') {
this.zoomToOriginal();
} else {
this.zoomToFit();
@@ -198,7 +201,7 @@
} else if ($(window).width() < this.zoomable.width ||
$(window).height() < this.zoomable.height ||
this.fullScreen !== null ||
- this.currentImage.mimeType === 'image/svg+xml') {
+ this.mimeType === 'image/svg+xml') {
// The image is larger than the window, or we are fullScreen,
// or this is an SVG. Set minimum zoom and call zoomToFit.
this.zoomable.setMinZoom(this.zoomable.getZoomToFitValue());