Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Use new trackx event
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Aug 5, 2014
1 parent 942dad9 commit 0c10fef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions paper-slider.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@

<link rel="stylesheet" href="paper-slider.css">

<div id="sliderContainer" touch-action="pan-y" on-keydown="{{keydown}}">
<div id="sliderContainer" on-keydown="{{keydown}}">

<paper-progress id="sliderBar" aria-hidden="true" min="{{min}}" max="{{max}}" value="{{immediateValue}}" secondaryProgress="{{secondaryProgress}}"
on-down="{{bardown}}" on-up="{{resetKnob}}"
on-trackstart="{{trackStart}}" on-track="{{track}}" on-trackend="{{trackEnd}}"></paper-progress>
on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}"></paper-progress>

<template if="{{snaps && !disabled}}">
<div class="slider-markers" horizontal layout>
Expand All @@ -84,8 +84,8 @@
</template>

<div id="sliderKnob" class="{{ {pin : pin, snaps : snaps} | tokenList }}"
touch-action="none" on-down="{{expandKnob}}" on-up="{{resetKnob}}"
on-trackstart="{{trackStart}}" on-track="{{track}}" on-trackend="{{trackEnd}}"
on-down="{{expandKnob}}" on-up="{{resetKnob}}"
on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}"
on-transitionend="{{knobTransitionEnd}}"
role="slider" aria-valuenow="{{value}}" aria-valuemin="{{min}}" aria-valuemax="{{max}}"
aria-valuetext="{{value}}" tabindex="0"
Expand Down Expand Up @@ -242,7 +242,7 @@
e.preventTap();
},

track: function(e) {
trackx: function(e) {
var x = Math.min(this._maxx, Math.max(this._minx, e.dx));
this._x = this._startx + x;
this._ratio = this._x / this._w;
Expand Down

0 comments on commit 0c10fef

Please sign in to comment.