dat.gui/elements/controller-number/controller-number.html

48 lines
1.1 KiB
HTML
Raw Normal View History

2014-08-23 07:05:22 +00:00
<link rel="import" href="../../../polymer/polymer.html">
<link rel="import" href="../controller-base/controller-base.html">
2014-08-15 02:21:45 +00:00
<script src="controller-number.js"></script>
2014-08-15 16:32:49 +00:00
<polymer-element
name="controller-number"
2014-08-15 16:32:49 +00:00
attributes="min max value step"
extends="controller-base"
2014-08-15 16:32:49 +00:00
>
2014-08-15 02:21:45 +00:00
<template>
<link rel="stylesheet" href="controller-number.css">
2014-08-15 02:21:45 +00:00
2014-08-21 17:20:06 +00:00
<div id="container" class="transition slider-{{ slider }}" 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
2014-08-21 17:20:06 +00:00
hidden?="{{ !slider }}"
2014-08-15 02:21:45 +00:00
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>