The SVG vector-effect property prevents browsers from scaling stroke widths on scaled elements, so that the stroke widths are consistent regardless of scale. The maps use this property to ensure that strokes are the same for different maps, because each has a different scale depending on its zoom region.
Actual Behavior
All of the maps that scale with an SVG viewBox have scaled stroke widths in IE. Even Edge doesn't support it yet, which suggests that we need to find a general-purpose solution for IE.
Potential Fixes
It's easy to detect support for vector-effect, but polyfilling this could be tricky because of the external content. One solution might be to force svg4everybody to insert copies of the elements on all versions of IE (with polyfill: true in the options), then determine the scale of each element that has a stroke-width and adjust accordingly. There aren't any hooks to listen for the insertion in svg4everybody, but since we're maintaining our own fork we could add them. One alternative would be to use mutation observers, which are only supported on IE11 and later.
Expected Behavior
The SVG vector-effect property prevents browsers from scaling stroke widths on scaled elements, so that the stroke widths are consistent regardless of scale. The maps use this property to ensure that strokes are the same for different maps, because each has a different scale depending on its zoom region.
Actual Behavior
All of the maps that scale with an SVG
viewBox
have scaled stroke widths in IE. Even Edge doesn't support it yet, which suggests that we need to find a general-purpose solution for IE.Potential Fixes
It's easy to detect support for
vector-effect
, but polyfilling this could be tricky because of the external content. One solution might be to force svg4everybody to insert copies of the elements on all versions of IE (withpolyfill: true
in the options), then determine the scale of each element that has astroke-width
and adjust accordingly. There aren't any hooks to listen for the insertion in svg4everybody, but since we're maintaining our own fork we could add them. One alternative would be to use mutation observers, which are only supported on IE11 and later.