fix some minor slide navigation bugs

This commit is contained in:
ansuz
2017-07-13 10:57:27 +02:00
parent a756faf818
commit 7a225af11e

View File

@@ -66,6 +66,7 @@ define([
var goTo = Slide.goTo = function (i) { var goTo = Slide.goTo = function (i) {
i = i || 0; i = i || 0;
Slide.index = i;
$content.find('.slide-container').first().css('margin-left', -(i*100)+'%'); $content.find('.slide-container').first().css('margin-left', -(i*100)+'%');
updateFontSize(); updateFontSize();
change(Slide.lastIndex, Slide.index); change(Slide.lastIndex, Slide.index);
@@ -107,7 +108,7 @@ define([
//$content.find('.' + slideClass).hide(); //$content.find('.' + slideClass).hide();
//$content.find('.' + slideClass + ':eq( ' + i + ' )').show(); //$content.find('.' + slideClass + ':eq( ' + i + ' )').show();
//$content.css('margin-left', -(i*100)+'vw'); //$content.css('margin-left', -(i*100)+'vw');
goTo(i); goTo(Math.min(i, getNumberOfSlides() - 1));
}; };
Slide.updateOptions = function () { Slide.updateOptions = function () {