Skip to content

Commit

Permalink
perf(ripple): prevents jank by using raf
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Dec 5, 2016
1 parent 1e95e85 commit 66bbd24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion src/components/tap-click/ripple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 66bbd24

Please sign in to comment.