| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 Polymer({ | 3 Polymer({ |
| 4 | 4 |
| 5 is: 'hero-animation', | 5 is: 'hero-animation', |
| 6 | 6 |
| 7 behaviors: [ | 7 behaviors: [ |
| 8 Polymer.NeonSharedElementAnimationBehavior | 8 Polymer.NeonSharedElementAnimationBehavior |
| 9 ], | 9 ], |
| 10 | 10 |
| 11 configure: function(config) { | 11 configure: function(config) { |
| 12 var shared = this.findSharedElements(config); | 12 var shared = this.findSharedElements(config); |
| 13 if (!shared) { | 13 if (!shared) { |
| 14 return null; | 14 return; |
| 15 } | 15 } |
| 16 | 16 |
| 17 var fromRect = shared.from.getBoundingClientRect(); | 17 var fromRect = shared.from.getBoundingClientRect(); |
| 18 var toRect = shared.to.getBoundingClientRect(); | 18 var toRect = shared.to.getBoundingClientRect(); |
| 19 | 19 |
| 20 var deltaLeft = fromRect.left - toRect.left; | 20 var deltaLeft = fromRect.left - toRect.left; |
| 21 var deltaTop = fromRect.top - toRect.top; | 21 var deltaTop = fromRect.top - toRect.top; |
| 22 var deltaWidth = fromRect.width / toRect.width; | 22 var deltaWidth = fromRect.width / toRect.width; |
| 23 var deltaHeight = fromRect.height / toRect.height; | 23 var deltaHeight = fromRect.height / toRect.height; |
| 24 | 24 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 38 var shared = this.findSharedElements(config); | 38 var shared = this.findSharedElements(config); |
| 39 if (!shared) { | 39 if (!shared) { |
| 40 return null; | 40 return null; |
| 41 } | 41 } |
| 42 shared.to.style.zIndex = ''; | 42 shared.to.style.zIndex = ''; |
| 43 shared.from.style.visibility = ''; | 43 shared.from.style.visibility = ''; |
| 44 } | 44 } |
| 45 | 45 |
| 46 }); | 46 }); |
| 47 | 47 |
| OLD | NEW |