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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/neon-animation/animations/scale-up-animation-extracted.js

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 1
2 2
3 Polymer({ 3 Polymer({
4 4
5 is: 'scale-up-animation', 5 is: 'scale-up-animation',
6 6
7 behaviors: [ 7 behaviors: [
8 Polymer.NeonAnimationBehavior 8 Polymer.NeonAnimationBehavior
9 ], 9 ],
10 10
11 configure: function(config) { 11 configure: function(config) {
12 var node = config.node; 12 var node = config.node;
13 13
14 if (config.transformOrigin) { 14 if (config.transformOrigin) {
15 this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin ); 15 this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin );
16 } 16 }
17 17
18 var scaleProperty = 'scale(0)';
19 if (config.axis === 'x') {
20 scaleProperty = 'scale(0, 1)';
21 } else if (config.axis === 'y') {
22 scaleProperty = 'scale(1, 0)';
23 }
24
18 this._effect = new KeyframeEffect(node, [ 25 this._effect = new KeyframeEffect(node, [
19 {'transform': 'scale(0)'}, 26 {'transform': scaleProperty},
20 {'transform': 'scale(1)'} 27 {'transform': 'scale(1, 1)'}
21 ], this.timingFromConfig(config)); 28 ], this.timingFromConfig(config));
22 29
23 return this._effect; 30 return this._effect;
24 } 31 }
25 32
26 }); 33 });
27 34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698