| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 @license | |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE | |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS | |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS | |
| 7 Code distributed by Google as part of the polymer project is also | |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS | |
| 9 --><html><head><link rel="import" href="../paper-styles/paper-styles.html"> | |
| 10 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> | |
| 11 <link rel="import" href="../iron-behaviors/iron-control-state.html"> | |
| 12 <link rel="import" href="../paper-progress/paper-progress.html"> | |
| 13 <link rel="import" href="../paper-input/paper-input.html"> | |
| 14 | |
| 15 <!-- | |
| 16 `paper-slider` allows user to select a value from a range of values by | |
| 17 moving the slider thumb. The interactive nature of the slider makes it a | |
| 18 great choice for settings that reflect intensity levels, such as volume, | |
| 19 brightness, or color saturation. | |
| 20 | |
| 21 Example: | |
| 22 | |
| 23 <paper-slider></paper-slider> | |
| 24 | |
| 25 Use `min` and `max` to specify the slider range. Default is 0 to 100. | |
| 26 | |
| 27 Example: | |
| 28 | |
| 29 <paper-slider min="10" max="200" value="110"></paper-slider> | |
| 30 | |
| 31 Styling slider: | |
| 32 | |
| 33 To change the slider progress bar color: | |
| 34 | |
| 35 paper-slider { | |
| 36 --paper-slider-active-color: #0f9d58; | |
| 37 } | |
| 38 | |
| 39 To change the slider knob color: | |
| 40 | |
| 41 paper-slider { | |
| 42 --paper-slider-knob-color: #0f9d58; | |
| 43 } | |
| 44 | |
| 45 To change the slider pin color: | |
| 46 | |
| 47 paper-slider { | |
| 48 --paper-slider-pin-color: #0f9d58; | |
| 49 } | |
| 50 | |
| 51 To change the slider pin's font color: | |
| 52 | |
| 53 paper-slider { | |
| 54 --paper-slider-pin-font-color: #0f9d58; | |
| 55 } | |
| 56 | |
| 57 To change the slider secondary progress bar color: | |
| 58 | |
| 59 paper-slider { | |
| 60 --paper-slider-secondary-color: #0f9d58; | |
| 61 } | |
| 62 | |
| 63 To change the slider disabled active color: | |
| 64 | |
| 65 paper-slider { | |
| 66 --paper-slider-disabled-active-color: #ccc; | |
| 67 } | |
| 68 | |
| 69 To change the slider disabled secondary progress bar color: | |
| 70 | |
| 71 paper-slider { | |
| 72 --paper-slider-disabled-secondary-color: #ccc; | |
| 73 } | |
| 74 | |
| 75 @group Paper Elements | |
| 76 @element paper-slider | |
| 77 @demo demo/index.html | |
| 78 @hero hero.svg | |
| 79 --> | |
| 80 | |
| 81 </head><body><dom-module id="paper-slider"> | |
| 82 <link rel="import" type="css" href="paper-slider.css"> | |
| 83 <template> | |
| 84 <template is="dom-if" if="{{!disabled}}"> | |
| 85 </template> | |
| 86 | |
| 87 <div id="sliderContainer" class$="[[_getClassNames(disabled, pin, snaps, imm
ediateValue, min, expand, dragging, transiting, editable)]]"> | |
| 88 <div class="bar-container"> | |
| 89 <paper-progress id="sliderBar" aria-hidden="true" min="[[min]]" max="[[m
ax]]" value="[[immediateValue]]" secondary-progress="[[secondaryProgress]]" on-d
own="_bardown" on-up="_resetKnob" on-track="_onTrack"></paper-progress> | |
| 90 </div> | |
| 91 | |
| 92 <template is="dom-if" if="[[snaps]]"> | |
| 93 <div class="slider-markers horizontal layout"> | |
| 94 <template is="dom-repeat" items="[[markers]]"> | |
| 95 <div class="slider-marker flex"></div> | |
| 96 </template> | |
| 97 </div> | |
| 98 </template> | |
| 99 | |
| 100 <div id="sliderKnob" on-down="_knobdown" on-up="_resetKnob" on-track="_onT
rack" on-transitionend="_knobTransitionEnd" center-justified="" center="" horizo
ntal="" layout=""> | |
| 101 | |
| 102 <div id="sliderKnobInner" value$="[[immediateValue]]"></div> | |
| 103 </div> | |
| 104 </div> | |
| 105 | |
| 106 <template is="dom-if" if="[[editable]]"> | |
| 107 <paper-input id="input" class="slider-input" disabled$="[[disabled]]" on-c
hange="_inputChange"></paper-input> | |
| 108 </template> | |
| 109 | |
| 110 </template> | |
| 111 </dom-module> | |
| 112 | |
| 113 <script src="paper-slider-extracted.js"></script></body></html> | |
| OLD | NEW |