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 |
11 <link rel="import" href="../polymer/polymer.html"> | 11 <link rel="import" href="../polymer/polymer.html"> |
12 <link rel="import" href="animations/opaque-animation.html"> | |
13 | 12 |
14 <script> | 13 <script> |
15 | 14 |
16 /** | 15 /** |
17 * `Polymer.NeonAnimatableBehavior` is implemented by elements containing anim
ations for use with | 16 * `Polymer.NeonAnimatableBehavior` is implemented by elements containing anim
ations for use with |
18 * elements implementing `Polymer.NeonAnimationRunnerBehavior`. | 17 * elements implementing `Polymer.NeonAnimationRunnerBehavior`. |
19 * @polymerBehavior | 18 * @polymerBehavior |
20 */ | 19 */ |
21 Polymer.NeonAnimatableBehavior = { | 20 Polymer.NeonAnimatableBehavior = { |
22 | 21 |
(...skipping 21 matching lines...) Expand all Loading... |
44 */ | 43 */ |
45 exitAnimation: { | 44 exitAnimation: { |
46 observer: '_exitAnimationChanged', | 45 observer: '_exitAnimationChanged', |
47 type: String | 46 type: String |
48 } | 47 } |
49 | 48 |
50 }, | 49 }, |
51 | 50 |
52 _entryAnimationChanged: function() { | 51 _entryAnimationChanged: function() { |
53 this.animationConfig = this.animationConfig || {}; | 52 this.animationConfig = this.animationConfig || {}; |
54 if (this.entryAnimation !== 'fade-in-animation') { | 53 this.animationConfig['entry'] = [{ |
55 // insert polyfill hack | 54 name: this.entryAnimation, |
56 this.animationConfig['entry'] = [{ | 55 node: this |
57 name: 'opaque-animation', | 56 }]; |
58 node: this | |
59 }, { | |
60 name: this.entryAnimation, | |
61 node: this | |
62 }]; | |
63 } else { | |
64 this.animationConfig['entry'] = [{ | |
65 name: this.entryAnimation, | |
66 node: this | |
67 }]; | |
68 } | |
69 }, | 57 }, |
70 | 58 |
71 _exitAnimationChanged: function() { | 59 _exitAnimationChanged: function() { |
72 this.animationConfig = this.animationConfig || {}; | 60 this.animationConfig = this.animationConfig || {}; |
73 this.animationConfig['exit'] = [{ | 61 this.animationConfig['exit'] = [{ |
74 name: this.exitAnimation, | 62 name: this.exitAnimation, |
75 node: this | 63 node: this |
76 }]; | 64 }]; |
77 }, | 65 }, |
78 | 66 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // append the configurations saved in the map to the array | 141 // append the configurations saved in the map to the array |
154 for (var key in map) { | 142 for (var key in map) { |
155 allConfigs.push(map[key]); | 143 allConfigs.push(map[key]); |
156 } | 144 } |
157 return allConfigs; | 145 return allConfigs; |
158 } | 146 } |
159 | 147 |
160 }; | 148 }; |
161 | 149 |
162 </script> | 150 </script> |
OLD | NEW |