Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: third_party/polymer/components/neon-animation/neon-animated-pages.html

Issue 2113853002: Run bower update (Closed) Base URL: https://github.com/catapult-project/catapult@polymer10-migration
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <link rel="import" href="../polymer/polymer.html"> 10 <link rel="import" href="../polymer/polymer.html">
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 'neon-animation-finish': '_onNeonAnimationFinish' 91 'neon-animation-finish': '_onNeonAnimationFinish'
92 }, 92 },
93 93
94 _onIronSelect: function(event) { 94 _onIronSelect: function(event) {
95 var selectedPage = event.detail.item; 95 var selectedPage = event.detail.item;
96 96
97 // Only consider child elements. 97 // Only consider child elements.
98 if (this.items.indexOf(selectedPage) < 0) { 98 if (this.items.indexOf(selectedPage) < 0) {
99 return; 99 return;
100 } 100 }
101 101
102 var oldPage = this._valueToItem(this._prevSelected) || false; 102 var oldPage = this._valueToItem(this._prevSelected) || false;
103 this._prevSelected = this.selected; 103 this._prevSelected = this.selected;
104 104
105 // on initial load and if animateInitialSelection is negated, simply displ ay selectedPage. 105 // on initial load and if animateInitialSelection is negated, simply displ ay selectedPage.
106 if (!oldPage && !this.animateInitialSelection) { 106 if (!oldPage && !this.animateInitialSelection) {
107 this._completeSelectedChanged(); 107 this._completeSelectedChanged();
108 return; 108 return;
109 } 109 }
110 110
111 // insert safari fix. 111 this.animationConfig = [];
112 this.animationConfig = [{
113 name: 'opaque-animation',
114 node: selectedPage
115 }];
116 112
117 // configure selectedPage animations. 113 // configure selectedPage animations.
118 if (this.entryAnimation) { 114 if (this.entryAnimation) {
119 this.animationConfig.push({ 115 this.animationConfig.push({
120 name: this.entryAnimation, 116 name: this.entryAnimation,
121 node: selectedPage 117 node: selectedPage
122 }); 118 });
123 } else { 119 } else {
124 if (selectedPage.getAnimationConfig) { 120 if (selectedPage.getAnimationConfig) {
125 this.animationConfig.push({ 121 this.animationConfig.push({
(...skipping 30 matching lines...) Expand all
156 } 152 }
157 153
158 // display the oldPage during the transition. 154 // display the oldPage during the transition.
159 oldPage.classList.add('neon-animating'); 155 oldPage.classList.add('neon-animating');
160 } 156 }
161 157
162 // display the selectedPage during the transition. 158 // display the selectedPage during the transition.
163 selectedPage.classList.add('neon-animating'); 159 selectedPage.classList.add('neon-animating');
164 160
165 // actually run the animations. 161 // actually run the animations.
166 if (this.animationConfig.length > 1) { 162 if (this.animationConfig.length >= 1) {
167 163
168 // on first load, ensure we run animations only after element is attache d. 164 // on first load, ensure we run animations only after element is attache d.
169 if (!this.isAttached) { 165 if (!this.isAttached) {
170 this.async(function () { 166 this.async(function () {
171 this.playAnimation(undefined, { 167 this.playAnimation(undefined, {
172 fromPage: null, 168 fromPage: null,
173 toPage: selectedPage 169 toPage: selectedPage
174 }); 170 });
175 }); 171 });
176 172
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 this.resizerShouldNotify = function(element) { 215 this.resizerShouldNotify = function(element) {
220 return element == selectedPage; 216 return element == selectedPage;
221 } 217 }
222 this.notifyResize(); 218 this.notifyResize();
223 } 219 }
224 220
225 }) 221 })
226 222
227 })(); 223 })();
228 </script> 224 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698