Closed rickj33 closed 8 years ago
That's correct. The code is trying to fit n cells with left and right borders into a particular width. The legend sets the border width based on the weight style property, which is the Leaflet way of setting SVG shape/path stroke width.
thanks for the explanation
I am implementing a custom legend to produce this
I have it working, but when going through the code in L.Datalayer _getLegend I saw this line of code
the question is, what is the -2 * weight mean, is it compensating for the size of the border? and if so does weight mean border width?