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

Commit

Permalink
use the new trackx
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Aug 5, 2014
1 parent bcae433 commit 83abcac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paper-toggle-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

<link rel="import" href="../paper-radio-button/paper-radio-button.html">

<polymer-element name="paper-toggle-button" attributes="checked" touch-action="pan-y" role="button" aria-pressed="false" tabindex="0">
<polymer-element name="paper-toggle-button" attributes="checked" role="button" aria-pressed="false" tabindex="0">
<template>

<link rel="stylesheet" href="paper-toggle-button.css">
Expand All @@ -70,7 +70,7 @@
<div id="toggleBar" checked?="{{checked}}"></div>

<paper-radio-button id="toggleRadio" toggles checked="{{checked}}"
on-trackstart="{{trackStart}}" on-track="{{track}}" on-trackend="{{trackEnd}}"></paper-radio-button>
on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}"></paper-radio-button>

</div>

Expand Down Expand Up @@ -99,7 +99,7 @@
e.preventTap();
},

track: function(e) {
trackx: function(e) {
this._x = Math.min(this._w,
Math.max(0, this.checked ? this._w + e.dx : e.dx));
this.$.toggleRadio.classList.add('dragging');
Expand Down

0 comments on commit 83abcac

Please sign in to comment.