From abb4df93827af67bb54776ce71d4b74b973650d4 Mon Sep 17 00:00:00 2001 From: Jan Niggemann Date: Wed, 10 Jun 2015 13:21:10 +0200 Subject: [PATCH] Reverts "adds lightbox image autorotation (FF >v26)" This reverts commit 3fc42c02b31accf49aae8f1b5e4ecc2ac3b7355f. --- css/mediaboxBlack.css | 7 ------- css/mediaboxWhite.css | 7 ------- js/mediabox1.5.4.js | 16 ++-------------- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/css/mediaboxBlack.css b/css/mediaboxBlack.css index 95963cd..9213688 100644 --- a/css/mediaboxBlack.css +++ b/css/mediaboxBlack.css @@ -41,13 +41,6 @@ } #mbCenter img{ border-radius: 4px; - image-orientation: from-image; - position: absolute; - margin: auto; - top: 0; - left: 0; - right: 0; - bottom: 0; } #mbCenter.mbLoading { diff --git a/css/mediaboxWhite.css b/css/mediaboxWhite.css index 3d9f2d4..de9d439 100644 --- a/css/mediaboxWhite.css +++ b/css/mediaboxWhite.css @@ -42,13 +42,6 @@ #mbCenter img{ border-radius: 4px; - image-orientation: from-image; - position: absolute; - margin: auto; - top: 0; - left: 0; - right: 0; - bottom: 0; } #mbCenter.mbLoading { diff --git a/js/mediabox1.5.4.js b/js/mediabox1.5.4.js index 9e1f04f..821e599 100644 --- a/js/mediabox1.5.4.js +++ b/js/mediabox1.5.4.js @@ -815,16 +815,6 @@ var Mediabox; if (mediaType == "img"){ mediaWidth = preload.width; mediaHeight = preload.height; - - // Hack jn@hz6.de: make lightbox squared to make room for the image (that will be properly rotated by the browser [at least FF since v26]) - if (mediaWidth >= mediaHeight) { - mediaHeight = mediaWidth - } - - if (mediaWidth < mediaHeight) { - mediaWidth = mediaHeight - } - if (options.imgBackground) { media.setStyles({backgroundImage: "url("+URL+")", display: ""}); } else { // Thanks to Dusan Medlin for fixing large 16x9 image errors in a 4x3 browser @@ -839,9 +829,7 @@ var Mediabox; } if (Browser.ie) preload = document.id(preload); if (options.clickBlock) preload.addEvent('mousedown', function(e){ e.stop(); }).addEvent('contextmenu', function(e){ e.stop(); }); - - // Hack jn@hz6.de: Make position relative to work together with centered image (which is absolutely placed) - media.setStyles({backgroundImage: "none", display: "", position: "relative"}); + media.setStyles({backgroundImage: "none", display: ""}); preload.inject(media); } // mediaWidth += "px"; @@ -985,4 +973,4 @@ Mediabox.scanPage = function() { }); }; -window.addEvents({domready: Mediabox.scanPage, resize: Mediabox.recenter}); // to recenter the overlay while scrolling, add "scroll: Mediabox.recenter" to the object +window.addEvents({domready: Mediabox.scanPage, resize: Mediabox.recenter}); // to recenter the overlay while scrolling, add "scroll: Mediabox.recenter" to the object \ No newline at end of file