4 * Use `Polymer.NeonSharedElementAnimationBehavior` to implement shared element animations.
5 * @polymerBehavior Polymer.NeonSharedElementAnimationBehavior
7 Polymer.NeonSharedElementAnimationBehaviorImpl = {
12 * Cached copy of shared elements.
21 * Finds shared elements based on `config`.
23 findSharedElements: function(config) {
24 var fromPage = config.fromPage;
25 var toPage = config.toPage;
26 if (!fromPage || !toPage) {
27 console.warn(this.is + ':', !fromPage ? 'fromPage' : 'toPage', 'is undefined!');
31 if (!fromPage.sharedElements || !toPage.sharedElements) {
32 console.warn(this.is + ':', 'sharedElements are undefined for', !fromPage.sharedElements ? fromPage : toPage);
36 var from = fromPage.sharedElements[config.id]
37 var to = toPage.sharedElements[config.id];
40 console.warn(this.is + ':', 'sharedElement with id', config.id, 'not found in', !from ? fromPage : toPage);
44 this.sharedElements = {
48 return this.sharedElements;
53 /** @polymerBehavior Polymer.NeonSharedElementAnimationBehavior */
54 Polymer.NeonSharedElementAnimationBehavior = [
55 Polymer.NeonAnimationBehavior,
56 Polymer.NeonSharedElementAnimationBehaviorImpl