Skip to content

Commit

Permalink
set md-dragging class correctly. attach recognizers to the whole slid…
Browse files Browse the repository at this point in the history
…er. big usability improvement.
  • Loading branch information
miguelcobain committed Mar 9, 2017
1 parent b862081 commit 77274a0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions addon/components/paper-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default Component.extend(FocusableMixin, ColorMixin, {
attributeBindings: ['min', 'max', 'step', 'discrete:md-discrete', 'tabindex'],

classNames: ['md-default-theme'],
classNameBindings: ['isMinimum:md-min', 'active', 'dragging'],
classNameBindings: ['isMinimum:md-min', 'active', 'dragging:md-dragging'],

constants: inject.service(),

Expand Down Expand Up @@ -78,10 +78,8 @@ export default Component.extend(FocusableMixin, ColorMixin, {
},

_setupHammer() {
let thumbContainer = this.$('.md-thumb-container').get(0);

// Enable dragging the slider
let containerManager = new Hammer.Manager(thumbContainer);
let containerManager = new Hammer.Manager(this.element);
let pan = new Hammer.Pan({ direction: Hammer.DIRECTION_HORIZONTAL, threshold: 10 });
containerManager.add(pan);

Expand Down

0 comments on commit 77274a0

Please sign in to comment.