2014-08-15 02:21:45 +00:00
|
|
|
<link rel="import" href="../components/polymer/polymer.html">
|
2014-08-15 16:32:49 +00:00
|
|
|
<link rel="import" href="base-controller.html">
|
2014-08-15 02:21:45 +00:00
|
|
|
|
2014-08-15 16:32:49 +00:00
|
|
|
<script src="number-controller.js"></script>
|
|
|
|
|
|
|
|
<polymer-element
|
|
|
|
name="number-controller"
|
|
|
|
attributes="min max value step"
|
|
|
|
extends="base-controller"
|
|
|
|
constructor="NumberController"
|
|
|
|
>
|
2014-08-15 02:21:45 +00:00
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="number-controller.css">
|
|
|
|
|
2014-08-15 22:04:51 +00:00
|
|
|
<div id="container" class="transition" horizontal layout center>
|
2014-08-15 02:21:45 +00:00
|
|
|
|
|
|
|
<div id="track-container"
|
|
|
|
on-down="{{ down }}"
|
2014-08-15 22:04:51 +00:00
|
|
|
on-up="{{ up }}"
|
2014-08-15 02:21:45 +00:00
|
|
|
on-trackx="{{ trackx }}"
|
2014-08-15 16:32:49 +00:00
|
|
|
on-tracky="{{ tracky }}"
|
2014-08-15 02:21:45 +00:00
|
|
|
on-trackstart="{{ trackstart }}"
|
|
|
|
horizontal layout center
|
|
|
|
flex>
|
|
|
|
|
|
|
|
<div id="track">
|
|
|
|
|
2014-08-15 16:32:49 +00:00
|
|
|
<div id="fill"></div>
|
|
|
|
<div id="knob"></div>
|
2014-08-15 02:21:45 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="text"
|
2014-08-15 22:04:51 +00:00
|
|
|
value="{{ truncate( value ) }}"
|
2014-08-15 02:21:45 +00:00
|
|
|
on-click="{{ click }}"
|
2014-08-15 22:04:51 +00:00
|
|
|
on-keydown="{{ keydown }}"
|
|
|
|
on-blur="{{ blur }}"
|
2014-08-15 02:21:45 +00:00
|
|
|
id="input">
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2014-08-15 16:32:49 +00:00
|
|
|
</polymer-element>
|