| 1 | |
| 2 | if ( this.options.snap ) { |
| 3 | var snap = this._nearestSnap(newX, newY); |
| 4 | this.currentPage = snap; |
| 5 | time = this.options.snapSpeed || Math.max( |
| 6 | Math.max( |
| 7 | Math.min(Math.abs(newX - snap.x), 1000), |
| 8 | Math.min(Math.abs(newY - snap.y), 1000) |
| 9 | ), 300); |
| 10 | newX = snap.x; |
| 11 | newY = snap.y; |
| 12 | |
| 13 | this.directionX = 0; |
| 14 | this.directionY = 0; |
| 15 | easing = this.options.bounceEasing; |
| 16 | } |