Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

feat(gestures): add ability to disable all gestures for perf #11246

Merged
merged 1 commit into from
Apr 23, 2018

Conversation

Splaktar
Copy link
Member

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

There is currently no way to disable gestures across an entire application. This can be useful when memory leak (detached DOM nodes) or other performance issues related to gestures become a problem.

Issue Number:
Fixes #10884. Relates to #10885.

What is the new behavior?

It is now possible to disable all of the gesture detection in an AngularJS Material app.

app
  .module('myApp',['ngMaterial'])
  .config(['$mdGestureProvider', function($mdGestureProvider) {
    // Useful for environments where swipe and touch events are not important.
    $mdGestureProvider.disableAll();
  }])

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

This is based on the initial work by @ThomasBurleson in #10885.

@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Apr 19, 2018
@Splaktar Splaktar added type: gestures type: performance This issue is related to performance severity: performance This issue causes a significant performance degradation P3: important Important issues that really should be fixed when possible. type: feature labels Apr 19, 2018
@Splaktar Splaktar added this to the 1.1.9 milestone Apr 19, 2018
@Splaktar Splaktar added the pr: merge ready This PR is ready for a caretaker to review label Apr 19, 2018
@andrewseguin andrewseguin merged commit 65d78e0 into master Apr 23, 2018
@mmalerba mmalerba removed their assignment Apr 23, 2018
@Splaktar Splaktar deleted the disableAllGestures branch April 24, 2018 07:25
Splaktar added a commit that referenced this pull request Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P3: important Important issues that really should be fixed when possible. pr: merge ready This PR is ready for a caretaker to review severity: performance This issue causes a significant performance degradation type: feature type: gestures type: performance This issue is related to performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(gesture): need ability to disable all gestures for perf
4 participants