File tree 7 files changed +21
-21
lines changed
7 files changed +21
-21
lines changed Original file line number Diff line number Diff line change 5
5
* license that can be found in the LICENSE file.
6
6
*/
7
7
-->
8
- < element name ="g-icon-button " attributes ="src, active ">
8
+ < element name ="g-icon-button " attributes ="src active ">
9
9
< link rel ="components " href ="g-icon.html ">
10
10
< template >
11
11
< style >
15
15
width : 40px ;
16
16
height : 40px ;
17
17
border : 1px solid transparent;
18
- padding : 9px ;
19
- background : inherit;
18
+ padding : 3px ;
20
19
cursor : pointer;
21
- -webkit-transition : none;
22
20
}
23
21
24
22
@host : hover, @host .selected {
25
23
border : 1px solid rgba (0 , 0 , 0 , 0.16 );
26
24
border-radius : 3px ;
27
- background : inherit;
28
25
opacity : 0.8 ;
29
26
}
30
27
Original file line number Diff line number Diff line change 17
17
}
18
18
19
19
# icon {
20
- width : 21 px ;
21
- height : 21 px ;
20
+ width : 32 px ;
21
+ height : 32 px ;
22
22
cursor : pointer;
23
23
background : no-repeat center;
24
- background-size : contain;
25
24
}
26
25
</ style >
27
26
< div id ="icon " style ="background-image:url({{src}}) "> </ div >
28
27
</ template >
29
28
< script >
30
29
/**
31
- * g-icon is a 21x21 glyph expressed as a background-image.
30
+ * g-icon is a 32x32 glyph expressed as a background-image.
32
31
* @module g-icon
33
32
*/
34
33
this . component ( ) ;
Original file line number Diff line number Diff line change 11
11
< link rel ="components " href ="g-overlay.html ">
12
12
< link rel ="components " href ="g-menu.html "/>
13
13
< template >
14
- < g-icon-button id ="button " on-click ="toggle " src ="{{src}} "> </ g-icon-button >
14
+ < g-icon-button id ="button " on-click ="toggle " src ="{{src}} " active =" {{opened}} " > </ g-icon-button >
15
15
< g-overlay id ="overlay " class ="slideup " opened ="{{opened}} ">
16
16
< div class ="arrow-border "> </ div >
17
17
< div class ="arrow "> </ div >
26
26
publish : {
27
27
//* Toggle the opened state of the dropdown.
28
28
toggle : function ( ) {
29
- this . $ . overlay . toggle ( ) ;
30
- this . $ . button . active = this . $ . overlay . opened ;
29
+ this . opened = ! this . opened ;
31
30
} ,
32
31
//* Returns the selected item.
33
32
get selection ( ) {
Original file line number Diff line number Diff line change 12
12
@host {
13
13
display : block;
14
14
box-sizing : border-box;
15
- padding : 11 px 10px ;
15
+ padding : 8 px 10px ;
16
16
margin : 10px ;
17
17
border : 1px solid transparent;
18
18
border-radius : 3px ;
Original file line number Diff line number Diff line change 6
6
*/
7
7
-->
8
8
< element name ="g-panels " attributes ="transition, selected, index "
9
- handlers =" keydown: keydownHandler ">
9
+ on-keydown =" keydownHandler ">
10
10
< link rel ="components " href ="g-component.html ">
11
11
< link rel ="components " href ="panel-transitions/g-panel-transition.html ">
12
12
< link rel ="components " href ="panel-transitions/g-keyframe-panel-transition.html ">
Original file line number Diff line number Diff line change 5
5
* license that can be found in the LICENSE file.
6
6
*/
7
7
-->
8
- < element name ="g-ratings " attributes ="count, value ">
8
+ < element name ="g-ratings " attributes ="count value ">
9
9
< link rel ="components " href ="g-component.html ">
10
10
< template >
11
11
< style >
21
21
background : url ('images/star_full.svg' ) center no-repeat;
22
22
}
23
23
</ style >
24
- < template iterate ="stars ">
25
- < span index ="{{index}} " class ="star {{starClass}} " on-click ="starClick "> </ span >
26
- </ template >
24
+ <!-- FIXME(ffu): in MDV polyfill, setting a model on a template element does
25
+ not cause the children to have the proper model. Workaround here to add a div
26
+ at the top-level. -->
27
+ < div >
28
+ < template iterate ="stars ">
29
+ < span index ="{{index}} " class ="star {{starClass}} " on-click ="starClick "> </ span >
30
+ </ template >
31
+ </ div >
27
32
</ template >
28
33
< script >
29
34
this . component ( {
42
47
s . starClass = i < this . value ? 'full' : '' ;
43
48
} . bind ( this ) ) ;
44
49
} ,
45
- starClick : function ( e ) {
46
- var s = e . currentTarget . model ;
50
+ starClick : function ( inEvent , inDetail , inSender ) {
51
+ var s = inSender . model ;
47
52
this . node . value = s . index + ( s . starClass == 'full' ? 0 : 1 ) ;
48
53
}
49
54
} ) ;
Original file line number Diff line number Diff line change 5
5
* license that can be found in the LICENSE file.
6
6
*/
7
7
-->
8
- < element name ="g-tabs " extends ="g-selector " attributes ="selected multi vertical " on-click =" clickHandler " >
8
+ < element name ="g-tabs " extends ="g-selector " attributes ="selected multi vertical ">
9
9
< link rel ="components " href ="g-selector.html ">
10
10
< template >
11
11
< style >
You can’t perform that action at this time.
0 commit comments