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

Is there a way I can manipulate the hot spot? I want to drag the hot spot. #1163

Open wuxianhuo opened 1 year ago

wuxianhuo commented 1 year ago

I am very sorry that my English is poor, so I can only ask you questions with the help of translation tools. I have looked up relevant materials, but I did not find any api that can operate hot spots. I want to add a drag and drop feature to the hotspot. There is no way.

mpetroff commented 1 year ago

If you set the draggable hot spot configuration parameter to true, the hot spot can be dragged. You can then use the dragHandlerFunc / dragHandlerArgs hot spot configuration parameters to define a function, and arguments to be passed to that function along with the event object, when dragging starts and stops. These are documented in doc/json-config-parameters.md.

However, there is currently no example for using these features, and you have to use the Git master branch to use them, since they are features that were added since the current v2.5.6 release.