|
@@ 496-516 (lines=21) @@
|
| 493 |
|
return d.promise(); |
| 494 |
|
}, |
| 495 |
|
|
| 496 |
|
'swipe': function(current, next, dir) { |
| 497 |
|
|
| 498 |
|
var d = UI.$.Deferred(); |
| 499 |
|
|
| 500 |
|
current.css('animation-duration', this.options.duration+'ms'); |
| 501 |
|
next.css('animation-duration', this.options.duration+'ms'); |
| 502 |
|
|
| 503 |
|
next.css('opacity', 1).one(UI.support.animation.end, function() { |
| 504 |
|
|
| 505 |
|
current.css('opacity', 0).removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out'); |
| 506 |
|
next.removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in'); |
| 507 |
|
d.resolve(); |
| 508 |
|
|
| 509 |
|
}.bind(this)); |
| 510 |
|
|
| 511 |
|
current.addClass(dir == -1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out'); |
| 512 |
|
next.addClass(dir == -1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in'); |
| 513 |
|
next.width(); // force redraw |
| 514 |
|
|
| 515 |
|
return d.promise(); |
| 516 |
|
}, |
| 517 |
|
|
| 518 |
|
'scale': function(current, next, dir) { |
| 519 |
|
|
|
@@ 474-494 (lines=21) @@
|
| 471 |
|
return d.promise(); |
| 472 |
|
}, |
| 473 |
|
|
| 474 |
|
'scroll': function(current, next, dir) { |
| 475 |
|
|
| 476 |
|
var d = UI.$.Deferred(); |
| 477 |
|
|
| 478 |
|
current.css('animation-duration', this.options.duration+'ms'); |
| 479 |
|
next.css('animation-duration', this.options.duration+'ms'); |
| 480 |
|
|
| 481 |
|
next.css('opacity', 1).one(UI.support.animation.end, function() { |
| 482 |
|
|
| 483 |
|
current.css('opacity', 0).removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out'); |
| 484 |
|
next.removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in'); |
| 485 |
|
d.resolve(); |
| 486 |
|
|
| 487 |
|
}.bind(this)); |
| 488 |
|
|
| 489 |
|
current.addClass(dir == -1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out'); |
| 490 |
|
next.addClass(dir == -1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in'); |
| 491 |
|
next.width(); // force redraw |
| 492 |
|
|
| 493 |
|
return d.promise(); |
| 494 |
|
}, |
| 495 |
|
|
| 496 |
|
'swipe': function(current, next, dir) { |
| 497 |
|
|