Closed Perpicx closed 2 years ago
First, I'm going to assume you're using the Pannellum API and not an <iframe>
, since a lightbox on the parent page wouldn't apply to the contents of an <iframe>
.
As for getting it to work, it depends on when and how the lightbox library you're using hooks in to display images. You may be able to get it to work by setting attributes: {}
in the hot spot configuration (along with type: "info"
). This would remove the _target
attribute, which could be the reason why it isn't working for you. If the lightbox library requires other attributes, you'd set them the same way. The other way would be to use the clickHandlerFunc
/ clickHandlerArgs
hot spot configuration parameters to call the lightbox library's function to open the library directly from JavaScript.
I've tried the "attributes" and added the trigger class from the lightbox. It is properly showing at the a tag for the image in the source code. But nothing happens on click. I also tried a simple javascript action on click on the hotspot without success. As I said: The lightbox is working fine in the same window inside the "panorama" on a button - but ot on a hotspot.
@Perpicx I think it have to use some trick to get something you want. use class name as id, and select the hotspot div element and do something. maybe it will works.(you can insert class to hotspot)
@Perpicx As I said previously, it depends on when and how the lightbox library you're using hooks in to display images. Depending on how it's implemented, it may not work on links that are dynamically added after the pages is loaded, such as what happens with hot spots.
Ok, I've managed it by using my own simple lightbox solution. Somehow I've overseen the "clickHandlerFunc" fucntion. Thanks anyway!
I'm trying to manage to open the "info" hotspot URL to an image as lightbox. The implemented lightbox (Glightbox) is working on the page, but not on any Pannellum generated link. How can I make it work?