| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 Copyright 2013 The Polymer Authors. All rights reserved. | |
| 3 Use of this source code is governed by a BSD-style | |
| 4 license that can be found in the LICENSE file. | |
| 5 --> | |
| 6 <!-- | |
| 7 /** | |
| 8 * polymer-selector is used to display a list of elements that can be selected. | |
| 9 * The attribute "selected" indicates which element is being selected. | |
| 10 * Tapping on the element to change selection would fire "polymer-activate" | |
| 11 * event. | |
| 12 * | |
| 13 * Example: | |
| 14 * | |
| 15 * <polymer-selector selected="0" on-polymer-activate="{{activateAction}}"> | |
| 16 * <div>Item 1</div> | |
| 17 * <div>Item 2</div> | |
| 18 * <div>Item 3</div> | |
| 19 * </polymer-selector> | |
| 20 * | |
| 21 * polymer-selector is not styled. So one needs to use "selected" CSS class | |
| 22 * to style the selected element. | |
| 23 * | |
| 24 * <style> | |
| 25 * .item.polymer-selected { | |
| 26 * background: #eee; | |
| 27 * } | |
| 28 * </style> | |
| 29 * ... | |
| 30 * <polymer-selector> | |
| 31 * <div class="item">Item 1</div> | |
| 32 * <div class="item">Item 2</div> | |
| 33 * <div class="item">Item 3</div> | |
| 34 * </polymer-selector> | |
| 35 */ | |
| 36 --> | |
| 37 <link rel="import" href="polymer_selection.html"> | |
| 38 | |
| 39 <polymer-element name="polymer-selector" on-tap="{{activateHandler}}" | |
| 40 touch-action="none"> | |
| 41 <template> | |
| 42 <polymer-selection id="selection" multi="{{multi}}" | |
| 43 on-polymer-select="{{selectionSelect}}"></polymer-selection> | |
| 44 <content id="items" select="*"></content> | |
| 45 </template> | |
| 46 <script type="application/dart" src="polymer_selector.dart"></script> | |
| 47 </polymer-element> | |
| OLD | NEW |