midzer / tobii

An accessible, open-source lightbox with no dependencies
https://midzer.github.io/tobii/demo/
MIT License
196 stars 20 forks source link

Support for multiple lightbox instances. #103

Open ABackw opened 1 year ago

ABackw commented 1 year ago

Old rqrauhvmra tobi-library worked with multiple instances. Why the support has been dropped?

Would it be possible to add a guid to class names (or as a user defined classname as input parameter) instead of hard coded names so the lightbox would work if there are multiple instances of it.

midzer commented 1 year ago

@ABackw What is the benefit of having multiple tobii instances? Whats a use case to allow them?

kallaviktor commented 1 year ago

@midzer I have multiple gallerys on my page, and I would like to only show a set of images when lightbox opened.

viliusle commented 1 year ago

You can use different groups, so even on 1 lightbox instance, users will see 2 galleries.

kallaviktor commented 1 year ago

Thank you, I have not noted this group option.

midzer commented 1 year ago

Is this issue solved for you, @ABackw @kallaviktor?

ABackw commented 1 year ago

Is this issue solved for you, @ABackw @kallaviktor?

Yes, I didn't come up with any benefits of multiple instances other than easier migration from the old version. That's not good enough reason. I'm fine with current state of things.