mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(ionSlideBox): fix regression allowing slide past boundaries
Closes #1414, #1405, #1409, #1321.
This commit is contained in:
@@ -376,9 +376,8 @@ ionic.views.Slider = ionic.views.View.inherit({
|
||||
Math.abs(delta.x) > width/2; // or if slide amt is greater than half the width
|
||||
|
||||
// determine if slide attempt is past start and end
|
||||
var isPastBounds =
|
||||
!index && delta.x > 0 | // if first slide and slide amt is greater than 0
|
||||
index == slides.length - 1 && delta.x < 0; // or if last slide and slide amt is less than 0
|
||||
var isPastBounds = (!index && delta.x > 0) || // if first slide and slide amt is greater than 0
|
||||
(index == slides.length - 1 && delta.x < 0); // or if last slide and slide amt is less than 0
|
||||
|
||||
if (options.continuous) isPastBounds = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user