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

Documentation: Hotspot "`click`" event types #1133

Closed strarsis closed 1 year ago

strarsis commented 1 year ago

The documentation states that the hotspot click event is handled by the function set in clickHandlerFunc field. However, not only the hotspot click event, but also the pointerup and touchend events will cause the clickHandlerFunc to be called - which makes sense as just the click event only works with a mouse input, not with touch (as being usually the sole input method on current mobile devices).

Maybe this should rather be named "hotspot selection" instead of "hotspot click", encompassing all events/interactions that indicate the intend to select that hotspot? But renaming this field would introduce a breaking change, so instead just name it like this in the documentation?

mpetroff commented 1 year ago

Good suggestion! However, I'm a stickler for serial commas, and your commit didn't include one. As it was a one-line change, it was easier for me to just make a new commit in 54b7b22d03d74eec16147027f0d55ca623153021 than accept the pull request and then add the comma.