Closed wahlatlas closed 1 year ago
The thickness of the rectangle is defined in screen pixels (4 by default). It cannot be adapted to the zoom level and/or cell size. This parameter type could be changed into a function of the zoom level and cell resolution so that it could be adapted.
OK: the parameter selectionRectangleWidthPix is now a function (r,zf) => 4 which computes this rectangle width in pixel, according to the resolution of the selected cell r and the zoom level zf. In such a way, you can adapt this width depending on the zoom level. This will be in the next release to be deployed today.
Not sure if selectionRectangleWidthPix is an SVG rect and if you've experimented with
non-scaling-stroke
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/vector-effectOn some zoom-levels the selectionRectangleWidthPix gets too thick for my taste, overlapping neighboring cells significantly, but maybe that's intentional for better discoverability?