Replies: 2 comments 5 replies
-
|
Issue 1 — Zoom The Zoom plugin currently only supports image slides (see https://yet-another-react-lightbox.com/plugins/zoom#requirements). A spread slide is a custom slide type, so Zoom won't work with it. Even if you made it pretend to be Are you using Issue 2 — Share and Download Both plugins resolve the current slide's URL via a fallback chain and support custom slide types out of the box — this is covered in the documentation for https://yet-another-react-lightbox.com/plugins/share and https://yet-another-react-lightbox.com/plugins/download. The fix: add share and/or download properties directly on spread slide objects: { type: "spread", left: {...}, right: {...}, share: leftImage.src, download: leftImage.src }Or provide custom Issue 3 — Sub-slide rendering pattern The intended pattern is the same one the Video plugin uses: define a custom slide type extending |
Beta Was this translation helpful? Give feedback.
-
|
Thanks!
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I've built a custom SpreadPlugin for yet-another-react-lightbox that displays two pages side by side (like a book spread). I've run into a few plugin interop issues and wanted to ask for guidance on the intended approach.
1. Zoom plugin stops working on spread slides
My SpreadPlugin augments
render.slideand renders two<ImageSlide>components side by side inside a wrapper div. This bypassesZoomWrapperentirely, so zoom gestures, pinch-to-zoom, and the zoom toolbar buttons all stop working when a spread slide is active.I've tried capturing the previous
render.slide(which is Zoom's augmented version) and delegating each page through it, but I'm not sure if that's the intended pattern for plugins that need to split a single slide into multiple sub-slides. Is there a recommended way to compose with the Zoom plugin in this case?2. Share and Download plugins are disabled on spread slides
The Share and Download plugins appear to derive the current slide's URL/src from the active slide object directly. Since a spread slide is a custom object (not a standard
SlideImage), they can't find a valid src and disable their buttons.Is there a hook or override (e.g. on the slide object itself, or via
render) that lets a custom plugin declare what src/url should be used for sharing and downloading? Or should I be implementing something at the slide data level?3. General question on sub-slide rendering patterns
Is there an intended way to build plugins that render multiple logical images within a single slide slot — without breaking other plugins that wrap or intercept
render.slide? Any guidance on plugin ordering or composition patterns would be really helpful.plugin snippet:
Beta Was this translation helpful? Give feedback.
All reactions