Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: pkg/polymer/lib/elements/polymer-animation/polymer-translate.html

Issue 175443005: [polymer] import all elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated from bower Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « pkg/polymer/lib/elements/polymer-animation/polymer-shake.html ('k') | pkg/polymer/lib/elements/polymer-animation/test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698