2 * Use `Polymer.NeonSharedElementAnimationBehavior` to implement shared element animations.
3 * @polymerBehavior Polymer.NeonSharedElementAnimationBehavior
5 Polymer.NeonSharedElementAnimationBehaviorImpl = {
10 * Cached copy of shared elements.
19 * Finds shared elements based on `config`.
21 findSharedElements: function(config) {
22 var fromPage = config.fromPage;
23 var toPage = config.toPage;
24 if (!fromPage || !toPage) {
25 console.warn(this.is + ':', !fromPage ? 'fromPage' : 'toPage', 'is undefined!');
29 if (!fromPage.sharedElements || !toPage.sharedElements) {
30 console.warn(this.is + ':', 'sharedElements are undefined for', !fromPage.sharedElements ? fromPage : toPage);
34 var from = fromPage.sharedElements[config.id]
35 var to = toPage.sharedElements[config.id];
38 console.warn(this.is + ':', 'sharedElement with id', config.id, 'not found in', !from ? fromPage : toPage);
42 this.sharedElements = {
46 return this.sharedElements;
51 /** @polymerBehavior Polymer.NeonSharedElementAnimationBehavior */
52 Polymer.NeonSharedElementAnimationBehavior = [
53 Polymer.NeonAnimationBehavior,
54 Polymer.NeonSharedElementAnimationBehaviorImpl