dk2k2014
Forum Replies Created
-
Thanks a lot!
This grey overlay is shown over the clicked photo and affects the colours of this photo
Didn’t notice that this plugin isn’t maintained any longer. Fix is available here fix
Forum: Plugins
In reply to: [Responsive Photo Gallery] Images not showing when clicking in galleryhi guys,
I face the same issue. You can see the behaviour described by @lawestra here: http://vosmon.ru/photogallery/ Just click on any gallery and you will see the black screen.
Free version as wellGuys, I’m facing this issue. Obviously, this error message doesn’t reflect the steps to fix it. Please provide the full list of PHP modules needed.
Forum: Plugins
In reply to: [Responsive Photo Gallery] Is it possible to handle mouse scroll up and downGuys, I’ve composed a fix and can provide a patch. Will try posting here, but indentation will break most likely. Contact me via [email protected] if you want. Fix can be tested here
— D:/user/Documents/responsive-gallery-with-lightbox/lightbox/swipebox/jquery.swipebox.js Sat Oct 27 11:30:24 2018
+++ D:/user/Documents/jquery.swipebox.js Mon Oct 29 23:05:23 2018
@@ -52,6 +54,20 @@
return ui;
}+ // This function checks if the specified event is supported by the browser.
+ // Source: http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+ function isEventSupported(eventName) {
+ var el = document.createElement(‘div’);
+ eventName = ‘on’ + eventName;
+ var isSupported = (eventName in el);
+ if (!isSupported) {
+ el.setAttribute(eventName, ‘return;’);
+ isSupported = typeof el[eventName] == ‘function’;
+ }
+ el = null;
+ return isSupported;
+ }
+
plugin.init = function() {plugin.settings = $.extend( {}, defaults, options );
@@ -207,6 +223,7 @@// Devices can have both touch and keyboard input so always allow key events
$this.keyboard();
+ $this.mouse();$this.animBars();
$this.resize();
@@ -499,6 +516,34 @@
},/**
+ * Mouse navigation
+ */
+ mouse : function () {
+ var wheelEvent = isEventSupported(‘mousewheel’) ? ‘mousewheel’ : ‘wheel’;
+ var $this = this;
+ $( window ).bind( wheelEvent, function( event ) {
+ event.preventDefault();
+ //event.stopPropagation();
+
+ var oEvent = event.originalEvent;
+ var delta = oEvent.deltaY || oEvent.wheelDelta;
+
+ // deltaY for wheel event
+ // wheelData for mousewheel event
+
+ console.log(delta);
+ if (delta > 0) {
+ // Scrolled up
+ $this.getNext();
+ } else if (delta < 0) {
+ // Scrolled down
+ $this.getPrev();
+ }
+
+ } );
+ },
+
+ /**
* Navigation events : go to next slide, go to prevous slide and close
*/
actions : function () {
@@ -759,6 +804,9 @@
*/
destroy : function () {
$( window ).unbind( ‘keyup’ );
+ // need to check which event to unbind the same way as having binded it
+ var wheelEvent = isEventSupported(‘mousewheel’) ? ‘mousewheel’ : ‘wheel’;
+ $( window ).unbind( wheelEvent );
$( ‘body’ ).unbind( ‘touchstart’ );
$( ‘body’ ).unbind( ‘touchmove’ );
$( ‘body’ ).unbind( ‘touchend’ );Forum: Plugins
In reply to: [Responsive Photo Gallery] Is it possible to handle mouse scroll up and downNot fixed in the new version 1.7.1 – in the image view mode scrolling moves the position on the page and doesn’t switch to the next or to the previous image