dat.gui/elements/number-controller.html

61 lines
1.1 KiB
HTML
Raw Normal View History

2014-08-15 02:21:45 +00:00
<!--
2014-08-15 16:32:49 +00:00
[ ] step
[ ] sig figs
2014-08-15 02:21:45 +00:00
2014-08-15 16:32:49 +00:00
[ ] arrow keys
2014-08-15 02:21:45 +00:00
2014-08-15 16:32:49 +00:00
[ ] only validate input box on blur, not on keydown
[ ] enter key blurs
[x] dy to drag friction
[x] negative slider
[x] hover behavior
-->
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">
<div id="container" horizontal layout center>
<div id="track-container"
on-down="{{ down }}"
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"
value="{{ value }}"
on-click="{{ click }}"
id="input">
</template>
</div>
2014-08-15 16:32:49 +00:00
</polymer-element>