yet-another-react-lightbox
Advanced tools
Comparing version 1.9.0 to 1.9.1
@@ -95,8 +95,8 @@ import * as React from "react"; | ||
const getSlideRects = (slide, cover, maxZoomPixelRatio, rect) => { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
let slideRect = { width: 0, height: 0 }; | ||
let maxSlideRect = { width: 0, height: 0 }; | ||
if (rect && !("type" in slide) && "src" in slide) { | ||
const width = Math.max(...(((_a = slide.srcSet) === null || _a === void 0 ? void 0 : _a.map((x) => x.width)) || []), ...[...(slide.width ? [slide.width] : [])]); | ||
const height = Math.max(...(((_b = slide.srcSet) === null || _b === void 0 ? void 0 : _b.map((x) => x.width)) || (slide.aspectRatio ? [width / slide.aspectRatio] : [])), ...[...(slide.height ? [slide.height] : [])]); | ||
const width = Math.max(...(((_a = slide.srcSet) === null || _a === void 0 ? void 0 : _a.map((x) => x.width)) || []).concat(slide.width ? [slide.width] : [])); | ||
const height = Math.max(...((_c = (_b = slide.srcSet) === null || _b === void 0 ? void 0 : _b.map((x) => x.height).filter((x) => Boolean(x))) !== null && _c !== void 0 ? _c : (slide.aspectRatio ? [width / slide.aspectRatio] : [])).concat(slide.height ? [slide.height] : [])); | ||
if (width > 0 && height > 0 && rect.width > 0 && rect.height > 0) { | ||
@@ -103,0 +103,0 @@ maxSlideRect = cover |
{ | ||
"name": "yet-another-react-lightbox", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "Modern React lightbox component", | ||
@@ -5,0 +5,0 @@ "author": "Igor Danchenko", |
@@ -139,3 +139,3 @@ # Yet Another React Lightbox | ||
- [Video](https://yet-another-react-lightbox.vercel.app/plugins/video) - adds support for video slides | ||
- [Zoom](https://yet-another-react-lightbox.vercel.app/plugins/zoom) - adds zoom feature | ||
- [Zoom](https://yet-another-react-lightbox.vercel.app/plugins/zoom) - adds image zoom feature | ||
@@ -142,0 +142,0 @@ ## License |
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
154772