mpetroff / pannellum

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

draggable:false not working #1108

Closed fleabeard69 closed 2 years ago

fleabeard69 commented 2 years ago

I'm specifying draggable as false and it's still allowing me to drag the pano?

pannellum.viewer("panorama",{type:"equirectangular",compass:!0,draggable:!0,autoLoad:!0,autoRotate:-10,hfov:160,autoRotateInactivityDelay:3e3,maxLevel:16,showZoomCtrl:!0,panorama:"assets/img/banner.jpg"});

mpetroff commented 2 years ago

That's because you're not setting it to false. You're setting it to !0, which evaluates as true.

fleabeard69 commented 2 years ago

That's because you're not setting it to false. You're setting it to !0, which evaluates as true.

What should I do if I specify draggable:!1 or even draggable:false and my pano is still draggable?

mpetroff commented 2 years ago

You should provide more information. What version of Pannellum are you using? What browser and browser version? Do you have an example that you can link to?

fleabeard69 commented 2 years ago

You should provide more information. What version of Pannellum are you using? What browser and browser version? Do you have an example that you can link to?

Browser is Chromium Version 104.0.5112.79 (Official Build) (64-bit) Sadly, the version info has been stripped out of this. Here's the entirety of the code: https://hastebin.com/cohovulonu.js

I'm using Bootstrap Studio 6.1.1 with the panorama plugin (that is essentially the code I linked above, stored as panorama.js in my assets/js/ folder).

I'm not a developer or even somewhat familiar with js in the slightest. Just trying to get this working for my site.

mpetroff commented 2 years ago

Sadly, the version info has been stripped out of this.

The version information has not been stripped out. You're using v2.3.2, which was released almost six years ago and predates the introduction of the draggable parameter in v2.4.0. Switch to the current release, v2.5.6, and it should work.