File tree Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -1815,7 +1815,7 @@ methods.addLegend = function (options) {
1815
1815
var leftDiv = ( 0 , _jquery2 . default ) ( "<div/>" ) . css ( "float" , "left" ) ,
1816
1816
rightDiv = ( 0 , _jquery2 . default ) ( "<div/>" ) . css ( "float" , "left" ) ;
1817
1817
leftDiv . append ( gradSpan ) ;
1818
- ( 0 , _jquery2 . default ) ( div ) . append ( leftDiv ) . append ( rightDiv ) . append ( ( 0 , _jquery2 . default ) ( "<br clear=\"both\"/ >" ) ) ;
1818
+ ( 0 , _jquery2 . default ) ( div ) . append ( leftDiv ) . append ( rightDiv ) . append ( ( 0 , _jquery2 . default ) ( "<br>" ) ) ;
1819
1819
1820
1820
// Have to attach the div to the body at this early point, so that the
1821
1821
// svg text getComputedTextLength() actually works, below.
@@ -1863,7 +1863,7 @@ methods.addLegend = function (options) {
1863
1863
labels . push ( options . na_label ) ;
1864
1864
}
1865
1865
for ( var i = 0 ; i < colors . length ; i ++ ) {
1866
- legendHTML += "<i style=\"background:" + colors [ i ] + ";opacity:" + options . opacity + "\"></i> " + labels [ i ] + "<br clear='both'/>" ;
1866
+ legendHTML += "<i style=\"background:" + colors [ i ] + ";opacity:" + options . opacity + "\"></i> " + labels [ i ] ;
1867
1867
}
1868
1868
div . innerHTML = legendHTML ;
1869
1869
}
Original file line number Diff line number Diff line change @@ -6,27 +6,31 @@ img.leaflet-tile {
6
6
border : none;
7
7
}
8
8
.info {
9
- padding : 6px 8px ;
10
- font : 14 px/16px Arial, Helvetica, sans-serif;
11
- background : white;
12
- background : rgba (255 , 255 , 255 , 0.8 );
13
- box-shadow : 0 0 15px rgba (0 , 0 , 0 , 0.2 );
14
- border-radius : 5px ;
9
+ padding : 6px 8px ;
10
+ font : 14 px/16px Arial, Helvetica, sans-serif;
11
+ background : white;
12
+ background : rgba (255 , 255 , 255 , 0.8 );
13
+ box-shadow : 0 0 15px rgba (0 , 0 , 0 , 0.2 );
14
+ border-radius : 5px ;
15
15
}
16
16
.legend {
17
- line-height : 18px ;
18
- color : # 555 ;
17
+ line-height : 18px ;
18
+ color : # 555 ;
19
19
}
20
20
.legend svg text {
21
- fill : # 555 ;
21
+ fill : # 555 ;
22
22
}
23
23
.legend svg line {
24
- stroke : # 555 ;
24
+ stroke : # 555 ;
25
25
}
26
26
.legend i {
27
- width : 18px ;
28
- height : 18px ;
29
- float : left;
30
- margin-right : 8px ;
31
- opacity : 0.7 ;
27
+ width : 18px ;
28
+ height : 18px ;
29
+ margin-right : 4px ;
30
+ opacity : 0.7 ;
31
+ display : inline-block;
32
+ vertical-align : top;
33
+ /*For IE 7*/
34
+ zoom : 1 ;
35
+ * display : inline;
32
36
}
Original file line number Diff line number Diff line change @@ -727,7 +727,7 @@ methods.addLegend = function(options) {
727
727
rightDiv = $ ( "<div/>" ) . css ( "float" , "left" ) ;
728
728
leftDiv . append ( gradSpan ) ;
729
729
$ ( div ) . append ( leftDiv ) . append ( rightDiv )
730
- . append ( $ ( "<br clear=\"both\"/ >" ) ) ;
730
+ . append ( $ ( "<br>" ) ) ;
731
731
732
732
// Have to attach the div to the body at this early point, so that the
733
733
// svg text getComputedTextLength() actually works, below.
@@ -788,7 +788,7 @@ methods.addLegend = function(options) {
788
788
}
789
789
for ( let i = 0 ; i < colors . length ; i ++ ) {
790
790
legendHTML += "<i style=\"background:" + colors [ i ] + ";opacity:" +
791
- options . opacity + "\"></i> " + labels [ i ] + "<br clear='both'/>" ;
791
+ options . opacity + "\"></i> " + labels [ i ] ;
792
792
}
793
793
div . innerHTML = legendHTML ;
794
794
}
You can’t perform that action at this time.
0 commit comments