perf(animation): improves _progress() hot function

- progress() is the function where more time is spent during any swipe gesture
- replace iterating over the _fx properties, using an array instead
- optimize pointerCoord(), profiler showed it’s one of the most called functions
This commit is contained in:
Manu Mtz.-Almeida
2016-11-16 19:48:35 +01:00
parent 70f8a8e5eb
commit c44f6b6f2e
5 changed files with 95 additions and 78 deletions

View File

@ -51,7 +51,7 @@ ion-menu ion-backdrop {
z-index: -1;
display: none;
opacity: .1;
opacity: .01;
}
.menu-content {

View File

@ -232,7 +232,8 @@ describe('Refresher', () => {
function touchEv(y: number) {
return {
type: 'mockTouch',
touches: [{clientY: y}],
pageX: 0,
pageY: y,
preventDefault: function(){}
};
}