@plasmicapp/react-web 1.0.41 → 1.0.42
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/react-web.esm.js
CHANGED
|
@@ -778,10 +778,11 @@ var PlasmicImg = React__default.forwardRef(function PlasmicImg(props, outerRef)
|
|
|
778
778
|
if (aspectRatio && isFinite(aspectRatio) && isSvg(srcStr)) {
|
|
779
779
|
// For SVGs, fullWidth and fullHeight can be rounded values, which would
|
|
780
780
|
// cause some discrepancy between the actual aspect ratio and the aspect
|
|
781
|
-
// ratio from those values. So, for those cases, we
|
|
782
|
-
//
|
|
781
|
+
// ratio from those values. So, for those cases, we size the spacer from
|
|
782
|
+
// the aspect ratio instead. The height isn't rounded, because even at this
|
|
783
|
+
// width rounding it changes the rendered height by a fraction of a pixel.
|
|
783
784
|
spacerWidth = DEFAULT_SVG_WIDTH;
|
|
784
|
-
spacerHeight =
|
|
785
|
+
spacerHeight = spacerWidth / aspectRatio;
|
|
785
786
|
}
|
|
786
787
|
var _b = getWidths(computedDisplayWidth, fullWidth, {
|
|
787
788
|
minWidth: displayMinWidth,
|