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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-menu-button/paper-menu-button-animations-extracted.js

Issue 2947193002: Polymer: Remove unused paper-dropdown-menu, paper-menu-button. (Closed)
Patch Set: Created 3 years, 6 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
(Empty)
1 Polymer({
2 is: 'paper-menu-grow-height-animation',
3
4 behaviors: [
5 Polymer.NeonAnimationBehavior
6 ],
7
8 configure: function(config) {
9 var node = config.node;
10 var rect = node.getBoundingClientRect();
11 var height = rect.height;
12
13 this._effect = new KeyframeEffect(node, [{
14 height: (height / 2) + 'px'
15 }, {
16 height: height + 'px'
17 }], this.timingFromConfig(config));
18
19 return this._effect;
20 }
21 });
22
23 Polymer({
24 is: 'paper-menu-grow-width-animation',
25
26 behaviors: [
27 Polymer.NeonAnimationBehavior
28 ],
29
30 configure: function(config) {
31 var node = config.node;
32 var rect = node.getBoundingClientRect();
33 var width = rect.width;
34
35 this._effect = new KeyframeEffect(node, [{
36 width: (width / 2) + 'px'
37 }, {
38 width: width + 'px'
39 }], this.timingFromConfig(config));
40
41 return this._effect;
42 }
43 });
44
45 Polymer({
46 is: 'paper-menu-shrink-width-animation',
47
48 behaviors: [
49 Polymer.NeonAnimationBehavior
50 ],
51
52 configure: function(config) {
53 var node = config.node;
54 var rect = node.getBoundingClientRect();
55 var width = rect.width;
56
57 this._effect = new KeyframeEffect(node, [{
58 width: width + 'px'
59 }, {
60 width: width - (width / 20) + 'px'
61 }], this.timingFromConfig(config));
62
63 return this._effect;
64 }
65 });
66
67 Polymer({
68 is: 'paper-menu-shrink-height-animation',
69
70 behaviors: [
71 Polymer.NeonAnimationBehavior
72 ],
73
74 configure: function(config) {
75 var node = config.node;
76 var rect = node.getBoundingClientRect();
77 var height = rect.height;
78 var top = rect.top;
79
80 this.setPrefixedProperty(node, 'transformOrigin', '0 0');
81
82 this._effect = new KeyframeEffect(node, [{
83 height: height + 'px',
84 transform: 'translateY(0)'
85 }, {
86 height: height / 2 + 'px',
87 transform: 'translateY(-20px)'
88 }], this.timingFromConfig(config));
89
90 return this._effect;
91 }
92 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698