From 2a7e7ab9f69dc8dbadff5fc04cf8cb74849bcd4c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 7 Mar 2018 23:54:33 +0100 Subject: [PATCH] Revert "Disabled swipe-support in the mobile image viewer" This reverts commit c26f54c7268d7f2f061a5673822693e748a3dff9. --- wcfsetup/install/files/js/WCF.ImageViewer.js | 9 +-------- wcfsetup/install/files/style/ui/imageViewer.scss | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index 133d15683d..165f6f6567 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -368,10 +368,6 @@ $.widget('ui.wcfImageViewer', { setTimeout($.proxy(function() { if (this._isMobile && !this._container.hasClass('maximized')) { this._toggleView(); - - this._container[0].addEventListener(WCF_CLICK_EVENT, (function (event) { - if (!event.isDefaultPrevented && this._isMobile) this._toggleView(); - }).bind(this)); } }, this), 500); } @@ -937,8 +933,6 @@ $.widget('ui.wcfImageViewer', { _enableMobileView: function() { this._container.addClass('wcfImageViewerMobile'); - // the swipe-support conflicts with the ability to zoom in-and-out on images - /* var self = this; this._ui.imageContainer.swipe({ swipeLeft: function(event) { @@ -961,7 +955,6 @@ $.widget('ui.wcfImageViewer', { } } }); - */ this._isMobile = true; }, @@ -971,7 +964,7 @@ $.widget('ui.wcfImageViewer', { */ _disableMobileView: function() { this._container.removeClass('wcfImageViewerMobile'); - //this._ui.imageContainer.swipe('destroy'); + this._ui.imageContainer.swipe('destroy'); this._isMobile = false; }, diff --git a/wcfsetup/install/files/style/ui/imageViewer.scss b/wcfsetup/install/files/style/ui/imageViewer.scss index 7a8212dcf3..142fcf5621 100644 --- a/wcfsetup/install/files/style/ui/imageViewer.scss +++ b/wcfsetup/install/files/style/ui/imageViewer.scss @@ -52,7 +52,6 @@ $wcfImageViewerFontColor: rgba(211, 211, 211, 1); > header, > footer { opacity: 0; - pointer-events: none; visibility: hidden; transition: visibility 0s linear .24s, opacity .24s linear; @@ -60,7 +59,6 @@ $wcfImageViewerFontColor: rgba(211, 211, 211, 1); > div > ul > li.pointer { opacity: 0; - pointer-events: none; } } -- 2.20.1