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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/neon-animation/neon-shared-element-animation-behavior-extracted.js

Issue 1901343004: [Polymer] update third_party polymer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: new pull Created 4 years, 8 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 * Use `Polymer.NeonSharedElementAnimationBehavior` to implement shared elemen t animations. 2 * Use `Polymer.NeonSharedElementAnimationBehavior` to implement shared elemen t animations.
3 * @polymerBehavior Polymer.NeonSharedElementAnimationBehavior 3 * @polymerBehavior Polymer.NeonSharedElementAnimationBehavior
4 */ 4 */
5 Polymer.NeonSharedElementAnimationBehaviorImpl = { 5 Polymer.NeonSharedElementAnimationBehaviorImpl = {
6 6
7 properties: { 7 properties: {
8 8
9 /** 9 /**
10 * Cached copy of shared elements. 10 * Cached copy of shared elements.
11 */ 11 */
12 sharedElements: { 12 sharedElements: {
13 type: Object 13 type: Object
14 } 14 }
15 15
16 }, 16 },
17 17
18 /** 18 /**
19 * Finds shared elements based on `config`. 19 * Finds shared elements based on `config`.
20 */ 20 */
21 findSharedElements: function(config) { 21 findSharedElements: function(config) {
22 var fromPage = config.fromPage; 22 var fromPage = config.fromPage;
23 var toPage = config.toPage; 23 var toPage = config.toPage;
24 if (!fromPage || !toPage) { 24 if (!fromPage || !toPage) {
25 console.warn(this.is + ':', !fromPage ? 'fromPage' : 'toPage', 'is undef ined!'); 25 Polymer.Base._warn(this.is + ':', !fromPage ? 'fromPage' : 'toPage', 'is undefined!');
26 return null; 26 return null;
27 }; 27 };
28 28
29 if (!fromPage.sharedElements || !toPage.sharedElements) { 29 if (!fromPage.sharedElements || !toPage.sharedElements) {
30 console.warn(this.is + ':', 'sharedElements are undefined for', !fromPag e.sharedElements ? fromPage : toPage); 30 Polymer.Base._warn(this.is + ':', 'sharedElements are undefined for', !f romPage.sharedElements ? fromPage : toPage);
31 return null; 31 return null;
32 }; 32 };
33 33
34 var from = fromPage.sharedElements[config.id] 34 var from = fromPage.sharedElements[config.id]
35 var to = toPage.sharedElements[config.id]; 35 var to = toPage.sharedElements[config.id];
36 36
37 if (!from || !to) { 37 if (!from || !to) {
38 console.warn(this.is + ':', 'sharedElement with id', config.id, 'not fou nd in', !from ? fromPage : toPage); 38 Polymer.Base._warn(this.is + ':', 'sharedElement with id', config.id, 'n ot found in', !from ? fromPage : toPage);
39 return null; 39 return null;
40 } 40 }
41 41
42 this.sharedElements = { 42 this.sharedElements = {
43 from: from, 43 from: from,
44 to: to 44 to: to
45 }; 45 };
46 return this.sharedElements; 46 return this.sharedElements;
47 } 47 }
48 48
49 }; 49 };
50 50
51 /** @polymerBehavior Polymer.NeonSharedElementAnimationBehavior */ 51 /** @polymerBehavior Polymer.NeonSharedElementAnimationBehavior */
52 Polymer.NeonSharedElementAnimationBehavior = [ 52 Polymer.NeonSharedElementAnimationBehavior = [
53 Polymer.NeonAnimationBehavior, 53 Polymer.NeonAnimationBehavior,
54 Polymer.NeonSharedElementAnimationBehaviorImpl 54 Polymer.NeonSharedElementAnimationBehaviorImpl
55 ]; 55 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698