Index: polymer_1.0.4/bower_components/iron-dropdown/demo/grow-height-animation.html |
diff --git a/polymer_1.0.4/bower_components/neon-animation/animations/fade-in-animation.html b/polymer_1.0.4/bower_components/iron-dropdown/demo/grow-height-animation.html |
similarity index 62% |
copy from polymer_1.0.4/bower_components/neon-animation/animations/fade-in-animation.html |
copy to polymer_1.0.4/bower_components/iron-dropdown/demo/grow-height-animation.html |
index cdb74e30953aef175f863d51026e2bbee273e970..e2fdc448a07208ff00ac5af962ac733e4f80e471 100644 |
--- a/polymer_1.0.4/bower_components/neon-animation/animations/fade-in-animation.html |
+++ b/polymer_1.0.4/bower_components/iron-dropdown/demo/grow-height-animation.html |
@@ -9,27 +9,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
--> |
<link rel="import" href="../../polymer/polymer.html"> |
-<link rel="import" href="../neon-animation-behavior.html"> |
-<link rel="import" href="../web-animations.html"> |
- |
-<!-- |
-`<fade-in-animation>` animates the opacity of an element from 0 to 1. |
- |
-Configuration: |
-``` |
-{ |
- name: 'fade-in-animation', |
- node: <node> |
- timing: <animation-timing> |
-} |
-``` |
---> |
+<link rel="import" href="../../neon-animation/neon-animation-behavior.html"> |
<script> |
- |
Polymer({ |
- |
- is: 'fade-in-animation', |
+ is: 'expand-animation', |
behaviors: [ |
Polymer.NeonAnimationBehavior |
@@ -37,13 +21,16 @@ Configuration: |
configure: function(config) { |
var node = config.node; |
- this._effect = new KeyframeEffect(node, [ |
- {'opacity': '0'}, |
- {'opacity': '1'} |
- ], this.timingFromConfig(config)); |
+ |
+ var height = node.getBoundingClientRect().height; |
+ |
+ this._effect = new KeyframeEffect(node, [{ |
+ height: (height / 2) + 'px' |
+ }, { |
+ height: height + 'px' |
+ }], this.timingFromConfig(config)); |
+ |
return this._effect; |
} |
- |
}); |
- |
</script> |