perf(ripple): remove ripple w/in rAF

This commit is contained in:
Adam Bradley
2015-09-24 21:33:28 -05:00
parent 1243fcda2c
commit 2ef5f51851

View File

@@ -1,5 +1,5 @@
import {Activator} from './activator';
import {removeElement} from '../../util/dom';
import {removeElement, raf} from '../../util/dom';
import {Animation} from '../../animations/animation';
@@ -93,9 +93,9 @@ export class RippleActivator extends Activator {
forceComplete ||
parseInt(rippleId) + 5000 < Date.now()) {
// finished expanding and the user has lifted the pointer
setTimeout(() => {
raf(() => {
this.remove(rippleId);
}, 0);
});
}
}
}