Skip to content

Commit

Permalink
Fixed buggy swipe from previous release (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
midstar committed Apr 25, 2021
1 parent 03c92fd commit 21835ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,9 @@
// iPrev is optional (default is previous i)
function prevMedia(iPrev = mediaIndex) {
if (mediaIndex > 0) {
pauseVideo(mediaIndex);
mediaIndex--;
}
pauseVideo(iPrev);
animateSlide(iPrev, mediaIndex);
loadMediaThumb(mediaIndex);
loadMedia(mediaIndex);
Expand All @@ -914,9 +914,9 @@
// iPrev is optional (default is previous i)
function nextMedia(iPrev = mediaIndex) {
if (mediaIndex < (mediaFiles.length - 1)) {
pauseVideo(mediaIndex);
mediaIndex++;
}
pauseVideo(iPrev);
animateSlide(iPrev, mediaIndex);
loadMediaThumb(mediaIndex);
loadMedia(mediaIndex);
Expand Down

0 comments on commit 21835ad

Please sign in to comment.