yet-another-react-lightbox
Advanced tools
Comparing version 1.13.3 to 1.13.4
@@ -52,3 +52,6 @@ import * as React from "react"; | ||
} | ||
: undefined; | ||
: { | ||
maxWidth: "100%", | ||
maxHeight: "100%", | ||
}; | ||
const srcSet = (_g = image.srcSet) === null || _g === void 0 ? void 0 : _g.sort((a, b) => a.width - b.width).map((item) => `${item.src} ${item.width}w`).join(", "); | ||
@@ -66,5 +69,3 @@ const estimateActualWidth = () => { | ||
}; | ||
const sizes = srcSet && rect && hasWindow() | ||
? `${Math.ceil((Math.min(estimateActualWidth(), rect.width) / window.innerWidth) * 100)}vw` | ||
: undefined; | ||
const sizes = srcSet && rect && hasWindow() ? `${Math.round(Math.min(estimateActualWidth(), rect.width))}px` : undefined; | ||
return (React.createElement(React.Fragment, null, | ||
@@ -71,0 +72,0 @@ React.createElement("img", { ref: setImageRef, onLoad: onLoad, onError: onError, onClick: onClick, className: clsx(cssClass("slide_image"), cover && cssClass("slide_image_cover"), status !== SLIDE_STATUS_COMPLETE && cssClass("slide_image_loading")), draggable: false, alt: image.alt, style: style, sizes: sizes, srcSet: srcSet, src: image.src }), |
{ | ||
"name": "yet-another-react-lightbox", | ||
"version": "1.13.3", | ||
"version": "1.13.4", | ||
"description": "Modern React lightbox component", | ||
@@ -5,0 +5,0 @@ "author": "Igor Danchenko", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164149
3343