OLD | NEW |
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 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 is: 'hero-animation', | 40 is: 'hero-animation', |
41 | 41 |
42 behaviors: [ | 42 behaviors: [ |
43 Polymer.NeonSharedElementAnimationBehavior | 43 Polymer.NeonSharedElementAnimationBehavior |
44 ], | 44 ], |
45 | 45 |
46 configure: function(config) { | 46 configure: function(config) { |
47 var shared = this.findSharedElements(config); | 47 var shared = this.findSharedElements(config); |
48 if (!shared) { | 48 if (!shared) { |
49 return null; | 49 return; |
50 } | 50 } |
51 | 51 |
52 var fromRect = shared.from.getBoundingClientRect(); | 52 var fromRect = shared.from.getBoundingClientRect(); |
53 var toRect = shared.to.getBoundingClientRect(); | 53 var toRect = shared.to.getBoundingClientRect(); |
54 | 54 |
55 var deltaLeft = fromRect.left - toRect.left; | 55 var deltaLeft = fromRect.left - toRect.left; |
56 var deltaTop = fromRect.top - toRect.top; | 56 var deltaTop = fromRect.top - toRect.top; |
57 var deltaWidth = fromRect.width / toRect.width; | 57 var deltaWidth = fromRect.width / toRect.width; |
58 var deltaHeight = fromRect.height / toRect.height; | 58 var deltaHeight = fromRect.height / toRect.height; |
59 | 59 |
(...skipping 14 matching lines...) Expand all Loading... |
74 if (!shared) { | 74 if (!shared) { |
75 return null; | 75 return null; |
76 } | 76 } |
77 shared.to.style.zIndex = ''; | 77 shared.to.style.zIndex = ''; |
78 shared.from.style.visibility = ''; | 78 shared.from.style.visibility = ''; |
79 } | 79 } |
80 | 80 |
81 }); | 81 }); |
82 | 82 |
83 </script> | 83 </script> |
OLD | NEW |