| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 @license | 2 @license |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 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.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also | 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.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --> | 9 --> |
| 10 | 10 |
| 11 <link rel="import" href="../polymer/polymer.html"> |
| 12 <link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html
"> |
| 13 <link rel="import" href="../iron-selector/iron-selectable.html"> |
| 14 |
| 11 <!-- | 15 <!-- |
| 12 `iron-pages` is used to select one of its children to show. One use is to cycle
through a list of | 16 `iron-pages` is used to select one of its children to show. One use is to cycle
through a list of |
| 13 children "pages". | 17 children "pages". |
| 14 | 18 |
| 15 Example: | 19 Example: |
| 16 | 20 |
| 17 <iron-pages selected="0"> | 21 <iron-pages selected="0"> |
| 18 <div>One</div> | 22 <div>One</div> |
| 19 <div>Two</div> | 23 <div>Two</div> |
| 20 <div>Three</div> | 24 <div>Three</div> |
| 21 </iron-pages> | 25 </iron-pages> |
| 22 | 26 |
| 23 <script> | 27 <script> |
| 24 document.addEventListener('click', function(e) { | 28 document.addEventListener('click', function(e) { |
| 25 var pages = document.querySelector('iron-pages'); | 29 var pages = document.querySelector('iron-pages'); |
| 26 pages.selectNext(); | 30 pages.selectNext(); |
| 27 }); | 31 }); |
| 28 </script> | 32 </script> |
| 29 | 33 |
| 30 @group Polymer Iron Elements | 34 @group Iron Elements |
| 31 @class iron-pages | 35 @class iron-pages |
| 36 @hero hero.svg |
| 37 @demo demo/index.html |
| 32 @extends iron-selector | 38 @extends iron-selector |
| 33 --> | 39 --> |
| 34 | 40 |
| 35 <link rel="import" href="../polymer/polymer.html"> | |
| 36 <link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html
"> | |
| 37 <link rel="import" href="../iron-selector/iron-selectable.html"> | |
| 38 | |
| 39 <dom-module id="iron-pages"> | 41 <dom-module id="iron-pages"> |
| 40 | 42 |
| 41 <style> | 43 <style> |
| 42 | 44 |
| 43 :host { | 45 :host { |
| 44 display: block; | 46 display: block; |
| 45 } | 47 } |
| 46 | 48 |
| 47 :host > ::content > :not(.iron-selected) { | 49 :host > ::content > :not(.iron-selected) { |
| 48 display: none !important; | 50 display: none !important; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 72 observers: [ | 74 observers: [ |
| 73 '_selectedPageChanged(selected)' | 75 '_selectedPageChanged(selected)' |
| 74 ], | 76 ], |
| 75 | 77 |
| 76 _selectedPageChanged: function(selected, old) { | 78 _selectedPageChanged: function(selected, old) { |
| 77 this.async(this.notifyResize); | 79 this.async(this.notifyResize); |
| 78 } | 80 } |
| 79 }); | 81 }); |
| 80 | 82 |
| 81 </script> | 83 </script> |
| OLD | NEW |