Skip to content

Commit

Permalink
Build update
Browse files Browse the repository at this point in the history
  • Loading branch information
feimosi committed Sep 16, 2018
1 parent 7e9eed6 commit 7a9400f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 27 additions & 1 deletion dist/baguetteBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@
case 27: // Esc
hideOverlay();
break;
case 36: // Home
showFirstImage(event);
break;
case 35: // End
showLastImage(event);
break;
}
}

Expand Down Expand Up @@ -482,7 +488,9 @@
overlay.className = '';
setTimeout(function() {
overlay.style.display = 'none';
exitFullscreen();
if (document.fullscreen) {
exitFullscreen();
}
if (options.bodyClass && document.body.classList) {
document.body.classList.remove(options.bodyClass);
}
Expand Down Expand Up @@ -598,6 +606,22 @@
return show(currentIndex - 1);
}

// Return false at the left end of the gallery
function showFirstImage(event) {
if (event) {
event.preventDefault();
}
return show(0);
}

// Return false at the right end of the gallery
function showLastImage(event) {
if (event) {
event.preventDefault();
}
return show(currentGallery.length - 1);
}

/**
* Move the gallery to a specific index
* @param `index` {number} - the position of the image
Expand Down Expand Up @@ -679,6 +703,7 @@
}

// Borrowed from https://github.com/seiyria/bootstrap-slider/pull/680/files
/* eslint-disable getter-return */
function testPassiveEventsSupport() {
var passiveEvents = false;
try {
Expand All @@ -692,6 +717,7 @@

return passiveEvents;
}
/* eslint-enable getter-return */

function preloadNext(index) {
if (index - currentIndex >= options.preload) {
Expand Down
2 changes: 1 addition & 1 deletion dist/baguetteBox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a9400f

Please sign in to comment.