@plasmicapp/react-web 1.0.41 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -797,10 +797,11 @@ var PlasmicImg = React.forwardRef(function PlasmicImg(props, outerRef) {
797
797
  if (aspectRatio && isFinite(aspectRatio) && isSvg(srcStr)) {
798
798
  // For SVGs, fullWidth and fullHeight can be rounded values, which would
799
799
  // cause some discrepancy between the actual aspect ratio and the aspect
800
- // ratio from those values. So, for those cases, we set large width / height
801
- // values to get a more precise ratio from the spacer.
800
+ // ratio from those values. So, for those cases, we size the spacer from
801
+ // the aspect ratio instead. The height isn't rounded, because even at this
802
+ // width rounding it changes the rendered height by a fraction of a pixel.
802
803
  spacerWidth = DEFAULT_SVG_WIDTH;
803
- spacerHeight = Math.round(spacerWidth / aspectRatio);
804
+ spacerHeight = spacerWidth / aspectRatio;
804
805
  }
805
806
  var _b = getWidths(computedDisplayWidth, fullWidth, {
806
807
  minWidth: displayMinWidth,