perf(ripple): prevents jank by using raf

This commit is contained in:
Manu Mtz.-Almeida
2016-12-05 21:28:32 +01:00
parent 1e95e856ed
commit 66bbd24d8d
2 changed files with 1 additions and 3 deletions

View File

@ -410,8 +410,7 @@ export class Menu {
* @private
*/
setOpen(shouldOpen: boolean, animated: boolean = true): Promise<boolean> {
// _isPrevented is used to prevent unwanted opening/closing after swiping open/close
// or swiping open the menu while pressing down on the MenuToggle button
// If the menu is disabled or it is currenly being animated, let's do nothing
if ((shouldOpen === this.isOpen) || !this._isEnabled || this._isAnimating) {
return Promise.resolve(this.isOpen);
}

View File

@ -15,7 +15,6 @@ export class RippleActivator implements ActivatorBase {
constructor(app: App, config: Config) {
this.highlight = new Activator(app, config);
this.highlight.activatedDelay = 0;
}
clickAction(ev: UIEvent, activatableEle: HTMLElement, startCoord: PointerCoordinates) {