| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2013 The Polymer Authors. All rights reserved. | 2 Copyright 2013 The Polymer Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style | 3 Use of this source code is governed by a BSD-style |
| 4 license that can be found in the LICENSE file. | 4 license that can be found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <!-- | 6 <!-- |
| 7 /** | 7 /** |
| 8 * @module Polymer Elements | 8 * @module Polymer Elements |
| 9 */ | 9 */ |
| 10 --> | 10 --> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 * Fired when an item's selection state is changed. This event is fired both | 60 * Fired when an item's selection state is changed. This event is fired both |
| 61 * when an item is selected or deselected. The `isSelected` detail property | 61 * when an item is selected or deselected. The `isSelected` detail property |
| 62 * contains the selection state. | 62 * contains the selection state. |
| 63 * | 63 * |
| 64 * @event polymer-select | 64 * @event polymer-select |
| 65 * @param {Object} detail | 65 * @param {Object} detail |
| 66 * @param {boolean} detail.isSelected true for selection and false for deselec
tion | 66 * @param {boolean} detail.isSelected true for selection and false for deselec
tion |
| 67 * @param {Object} detail.item the item element | 67 * @param {Object} detail.item the item element |
| 68 */ | 68 */ |
| 69 --> | 69 --> |
| 70 <link rel="import" href="../packages/polymer/polymer.html"> |
| 70 <polymer-element name="polymer-selection" attributes="multi"> | 71 <polymer-element name="polymer-selection" attributes="multi"> |
| 71 <template> | 72 <template> |
| 72 <style> | 73 <style> |
| 73 :host { | 74 :host { |
| 74 display: none !important; | 75 display: none !important; |
| 75 } | 76 } |
| 76 </style> | 77 </style> |
| 77 </template> | 78 </template> |
| 78 <script> | 79 <script> |
| 79 Polymer('polymer-selection', { | 80 Polymer('polymer-selection', { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 * Toggles the selection state for `item`. | 143 * Toggles the selection state for `item`. |
| 143 * @method toggle | 144 * @method toggle |
| 144 * @param {any} item: The item to toggle. | 145 * @param {any} item: The item to toggle. |
| 145 */ | 146 */ |
| 146 toggle: function(item) { | 147 toggle: function(item) { |
| 147 this.setItemSelected(item, !this.isSelected(item)); | 148 this.setItemSelected(item, !this.isSelected(item)); |
| 148 } | 149 } |
| 149 }); | 150 }); |
| 150 </script> | 151 </script> |
| 151 </polymer-element> | 152 </polymer-element> |
| OLD | NEW |