3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.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/CONTRIBUTORS.txt
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/PATENTS.txt
10 <link href=
"../../core-icons/core-icons.html" rel=
"import">
11 <link href=
"../../core-icon-button/core-icon-button.html" rel=
"import">
12 <link href=
"../core-animated-pages.html" rel=
"import">
14 <polymer-element name=
"nested-animated-pages">
31 box-sizing: border-box;
35 .tall-toolbar.colored {
40 .tall-toolbar [flex] {
49 background-color: #f1f1f1;
61 <core-animated-pages id=
"pages" selected=
"{{page}}" selectedItem=
"{{selectedItem}}" transitions=
"hero-transition" no-transition?=
"{{noTransition}}">
63 <section id=
"page1" cross-fade
>
64 <div class=
"tall-toolbar colored" style=
"background-color:orange;" layout vertical
hero-id=
"thing" hero?=
"{{page === 0 || !noTransition}}">
65 <div layout horizontal center
>
66 <core-icon-button icon=
"clear" on-tap=
"{{back}}"></core-icon-button>
68 <core-icon-button icon=
"arrow-forward" on-tap=
"{{transition}}"></core-icon-button>
72 <div flex
class=
"body"></div>
75 <section layout vertical
id=
"page2" cross-fade
>
76 <div class=
"tall-toolbar" layout vertical
>
77 <div layout horizontal center
>
78 <core-icon-button icon=
"clear" on-tap=
"{{back}}"></core-icon-button>
80 <core-icon-button icon=
"arrow-forward" on-tap=
"{{transition}}"></core-icon-button>
84 <div flex
class=
"body"></div>
85 <div class=
"square" style=
"background-color:orange;" hero-id=
"thing" hero?=
"{{page === 1 || !noTransition}}"></div>
88 </core-animated-pages>
102 this.noTransition
= true;
103 this.fire('nested-back');
106 transition: function() {
107 this.noTransition
= false;
108 this.page
= this.page
=== 0 ? 1 : 0;