Skip to content
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
10 changes: 6 additions & 4 deletions swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ function Swipe(container, options) {
// do nothing if already on requested slide
if (index == to) return;

var moveSpeed = isNaN(slideSpeed) ? speed : slideSpeed;

if (browser.transitions) {

var direction = Math.abs(index-to) / (index-to); // 1: backward, -1: forward
Expand All @@ -134,15 +136,15 @@ function Swipe(container, options) {

to = circle(to);

move(index, width * direction, slideSpeed || speed);
move(to, 0, slideSpeed || speed);
move(index, width * direction, moveSpeed);
move(to, 0, moveSpeed);

if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place

} else {

to = circle(to);
animate(index * -width, to * -width, slideSpeed || speed);
animate(index * -width, to * -width, moveSpeed);
//no fallback for a circular continuous if the browser does not accept transitions
}

Expand Down Expand Up @@ -567,4 +569,4 @@ if ( window.jQuery || window.Zepto ) {
});
}
})( window.jQuery || window.Zepto )
}
}