mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
Fixed #99 with requestAnimationFrame polyfill
This commit is contained in:
@ -65,7 +65,7 @@
|
||||
SlideDrag.prototype.drag = function(e) {
|
||||
var _this = this, buttonsWidth;
|
||||
|
||||
window.requestAnimationFrame(function() {
|
||||
window.rAF(function() {
|
||||
// We really aren't dragging
|
||||
if(!_this._currentDrag) {
|
||||
return;
|
||||
@ -132,7 +132,7 @@
|
||||
e.target.removeEventListener('webkitTransitionEnd', onRestingAnimationEnd);
|
||||
};
|
||||
|
||||
window.requestAnimationFrame(function() {
|
||||
window.rAF(function() {
|
||||
var currentX = parseFloat(_this._currentDrag.content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0;
|
||||
if(currentX !== restingPoint) {
|
||||
_this._currentDrag.content.classList.add(ITEM_SLIDING_CLASS);
|
||||
@ -181,7 +181,7 @@
|
||||
ReorderDrag.prototype.drag = function(e) {
|
||||
var _this = this;
|
||||
|
||||
window.requestAnimationFrame(function() {
|
||||
window.rAF(function() {
|
||||
// We really aren't dragging
|
||||
if(!_this._currentDrag) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user