| Index: pkg/polymer/lib/elements/polymer-animation/polymer-translate.html
|
| diff --git a/pkg/polymer/lib/elements/polymer-animation/polymer-translate.html b/pkg/polymer/lib/elements/polymer-animation/polymer-translate.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..35aae3fac6658c0fd0c62fd3beb7ca8add6c16eb
|
| --- /dev/null
|
| +++ b/pkg/polymer/lib/elements/polymer-animation/polymer-translate.html
|
| @@ -0,0 +1,31 @@
|
| +<link rel="import" href="polymer-animation.html">
|
| +<polymer-element name="polymer-translate" extends="polymer-animation" attributes="fromX fromY toX toY">
|
| + <template>
|
| + </template>
|
| + <script>
|
| + Polymer('polymer-translate', {
|
| + fromX: '0',
|
| + fromY: '0',
|
| + toX: '0',
|
| + toY: '0',
|
| + fromXChanged: function() {
|
| + this.generate();
|
| + },
|
| + fromYChanged: function() {
|
| + this.generate();
|
| + },
|
| + toXChanged: function() {
|
| + this.generate();
|
| + },
|
| + toYChanged: function() {
|
| + this.generate();
|
| + },
|
| + generate: function() {
|
| + this.keyframes = [
|
| + {transform: 'translate3d(' + this.fromX + ',' + this.fromY + ', 0)'},
|
| + {transform: 'translate3d(' + this.toX + ',' + this.toY + ', 0)'}
|
| + ];
|
| + }
|
| + });
|
| + </script>
|
| +</polymer-element>
|
|
|