Skip to content

Commit

Permalink
Merge pull request #82 from PolymerLabs/remove-scrim-tap-debouncer
Browse files Browse the repository at this point in the history
remove scrim tap debouncer
  • Loading branch information
frankiefu committed Feb 23, 2016
2 parents 0ed5b02 + ba95f43 commit 630aad1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
12 changes: 2 additions & 10 deletions app-drawer/app-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,9 @@
},

_scrimTapHandler: function() {
if (this.persistent) {
return;
}

// This debouncer is needed because of Polymer/polymer#3405.
this.debounce('_scrimTapHandler', function() {
if (!this.persistent) {
this.opened = false;
}, 1);
}
},

_track: function(event) {
Expand Down Expand Up @@ -364,9 +359,6 @@
},

_trackEnd: function(event) {
// Track handler takes precedence over scrim tap handler. See Polymer/polymer#3405.
this.cancelDebouncer('_scrimTapHandler');

// Calculate the velocity.
this._velocity = this._calculateVelocity(event);

Expand Down
12 changes: 0 additions & 12 deletions app-drawer/test/app-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,6 @@
assert.isTrue(ev.defaultPrevented);
});

test('track events block scrim tap', function(done) {
drawer.opened = true;
drawer.fire('track', { state: 'start' });
drawer.fire('tap', null /* detail */, { node: scrim });
drawer.fire('track', { state: 'end', dx: 0, ddx: 0 });

window.setTimeout(function() {
assert.isTrue(drawer.opened);
done();
}, 1);
});

test('styles reset after swiping', function() {
drawer.fire('track', { state: 'start' });

Expand Down

0 comments on commit 630aad1

Please sign in to comment.