You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SvgRenderer._transformMeasurements() should always resize the SVG's viewBox to at least the size of every element in the SVG, with no clipping.
Actual Behavior
_transformMeasurements doesn't take into account the extra bounding box space added by miter (pointy-cornered) strokes. See this test case.
This is because it compensates for getBBox() not adding stroke widths by manually enlarging the bounding box by half the largest stroke with in the SVG. This works for circular and bevel joins, but not for miter joins, which can stick out arbitrarily far depending on what the element's stroke-miterlimit is set to.
The only cross-browser way I can think of to fix this is to manually calculate the miters' bounds, but this could get messy. Any other ideas?
The text was updated successfully, but these errors were encountered:
Expected Behavior
SvgRenderer._transformMeasurements()
should always resize the SVG's viewBox to at least the size of every element in the SVG, with no clipping.Actual Behavior
_transformMeasurements
doesn't take into account the extra bounding box space added by miter (pointy-cornered) strokes. See this test case.This is because it compensates for
getBBox()
not adding stroke widths by manually enlarging the bounding box by half the largest stroke with in the SVG. This works for circular and bevel joins, but not for miter joins, which can stick out arbitrarily far depending on what the element'sstroke-miterlimit
is set to.The only cross-browser way I can think of to fix this is to manually calculate the miters' bounds, but this could get messy. Any other ideas?
The text was updated successfully, but these errors were encountered: