mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.15k stars 710 forks source link

Add support of hotspot thumbnail image #1131

Open Wolfshe opened 1 year ago

Wolfshe commented 1 year ago

The proposed modification allows to add thumbnail at each hotspot linker. The thumbnail is display when the mouse enter in the hotspot linker element.

The thumbnail image is defined in the config json file with the "thumbnail" attribute.

mpetroff commented 1 year ago

Unless I'm missing something, this can already be done by setting the cssClass hot spot parameter and using the :hover selector for the custom CSS class. Doing this styling using CSS is better for performance reasons, anyway.

Wolfshe commented 1 year ago

The proposed feature allows to load a specific thumbnail for a hotspot (like preview rendering of the scene associated to the hotspot). This implies to use the thumbnail attribute loaded in javascript to craft adapted css attribute.

This feature cannot be implement by a custom CSS class with :hover because hotspots don't share same thumbnail.

Best regards

mpetroff commented 1 year ago

This feature cannot be implement by a custom CSS class with :hover because hotspots don't share same thumbnail.

Yes, it can. You just give each hot spot a different CSS class.