mpetroff / pannellum

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

Mouse actions when hover on hotspots #1099

Open prologonline opened 2 years ago

prologonline commented 2 years ago

Mouse wheel zoom and mouse drag don't work if I hover over hotspots. Can this be made to work?

toosakarin1412 commented 2 years ago

Mouse wheel zoom and mouse drag don't work if I hover over hotspots. Can this be made to work?

Have you got the solution for this problem ? @prologonline

prologonline commented 2 years ago

@toosakarin1412 No, I didn't find a solution. Too bad @mpetroff doesn't want to comment on this issue. I didn't try hard to solve it, because no time. If I find a solution, I'll post it.

mpetroff commented 1 year ago

I didn't try hard to solve it, because no time.

And you just assume I have time? I don't, since I didn't get a chance to look at this issue until now. However, making baseless acquisitions that I "don't want to comment on this issue" are self-fulfilling, since I'm much less inclined to help you now.

Regardless, mouse wheel zoom works for me in the current master branch, although it does not work in the latest 2.5.6 release. Hot spots have their own click event handlers, since they can be clickable, so dragging not working for them is intentional behavior.

If you want to make mouse dragging work on hot spots, you need to change dragFix to uiContainer on this line: https://github.com/mpetroff/pannellum/blob/71bac61e3b840061c8f3177230bc70282e0e8a02/src/js/pannellum.js#L502

prologonline commented 1 year ago

And you just assume I have time? @mpetroff I didn't mean it). Thank you!