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

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

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

Powered by Google App Engine
This is Rietveld 408576698