Skip to content

Commit

Permalink
fix(ionSlideBox): fix regression allowing slide past boundaries
Browse files Browse the repository at this point in the history
Closes #1414, #1405, #1409, #1321.
  • Loading branch information
ajoslin committed May 19, 2014
1 parent c3470ef commit ec5a276
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/views/sliderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ec5a276

Please sign in to comment.