Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Option to Disable Tapping/Clicking on Image to Navigate #386

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/jquery.nanogallery2.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@
viewerGallery: 'bottomOverMedia',
viewerGalleryTWidth: 40,
viewerGalleryTHeight: 40,
viewerTapToNavigate : true, // False to disable jumping to next or prev image on tap of image, gestures and buttons still

breakpointSizeSM : 480,
breakpointSizeME : 992,
Expand Down Expand Up @@ -9062,7 +9063,7 @@
else {
// toolbars are displayed -> display next/previous media
if( (new Date().getTime()) - G.VOM.singletapTime < 400 ) { return; } // to avoid conflict with MOUSEMOVE event

if( !viewerTapToNavigate ){ return; } // disabled
if( G.VOM.content.current.NGY2Item().mediaKind == 'img' && ev.target.className.indexOf('nGY2ViewerMedia') !== -1 ) {
var x =0;
if( ev.srcEvent instanceof MouseEvent ) {
Expand Down Expand Up @@ -9140,6 +9141,7 @@
else {
// toolbars are displayed -> display next/previous media
if( (new Date().getTime()) - G.VOM.singletapTime < 400 ) { return; } // to avoid conflict with MOUSEMOVE event
if( !viewerTapToNavigate ){ return; } // disabled
if( ev.target.className.indexOf('nGY2ViewerMedia') !== -1 ) {
var x = 0;
if( ev.srcEvent instanceof MouseEvent ) {
Expand Down