Skip to content

Commit 9cc9259

Browse files
committed
Correct legend
1 parent ad9109f commit 9cc9259

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,14 @@
292292
return this._div;
293293
};
294294
legend.update = function() {
295-
this._div.innerHTML = '<div class="leaflet-control-layers leaflet-control-layers-expanded" id="legendBox" style="width:300px;height:100px;background:gray"></div>';
295+
this._div.innerHTML = '<div class="leaflet-control-layers leaflet-control-layers-expanded" id="legendBox" style="width:250px;height:100px;background:gray"></div>';
296296
};
297297
legend.addTo(map);
298298

299299
var legendSVG = d3.select('#legendBox')
300300
.append('svg')
301301
.attr('transform', 'translate(0,' + 0 + ')')
302-
.attr('width', 300)
302+
.attr('width', 250)
303303
.attr('height', 100);
304304
showBlock = true;
305305
function toggleBlock(num) {

js/colorMapLegend.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ function createBoxLegend(svg) {
7878
function createColorMapLegend(svg, value) {
7979
colorbar = svg.append('g')
8080

81-
.attr('transform', 'translate(0, 40)')
81+
.attr('transform', 'translate(20, 30)')
8282
.attr('width', 50);
8383

84-
var w = 300, h = 50;
84+
var w = 200, h = 50;
8585

8686

8787
var legend = colorbar.append("defs")

0 commit comments

Comments
 (0)