I have a task to embed the tour into website. So, the problem is that the tour cover 90% of the visible part of the site page and doesn’t allow to scroll the website. I need to turn off the panorama reaction to any scrolling (zoom) actions. However, panorama rotation should be preserved. Setting FOV min and max to the equal value doesn’t work. How can I disable zoom in panorama?
How to block scrolling?
-
-
Hi,
set the 'mwheel' and optionally also the 'capturetouch' embedding settings to false:
https://krpano.com/docu/html/#mwheelBest regards,
Klaus -
It is very unobvious for me where to set the value "false" in the .js file. Can you help me please?
Best regards, Alex
-
-
Klaus, Many thanks! I figured it out!
-
These values are set during init of the player.
But once inited, can you update them based on a given event? (button click)My issue is on mobile:
i have a html block (via a plugin) with infotext, that sometimes grows over the screen, (not all text is visible at the bottom)
So i need scrolling event to scroll the html block.If i set the capturetouch to false, it will scroll the test
But then, the image can not be rotated anymore, cause THAT event is not caught anymore.So, i only need the capturetouch to be false, when the infoblock is opened (by button)
When the block is closed again, the capturetouch can be true again, so the image can be rotated again.Any ideas for this maybe?
-
i have a html block (via a plugin) with infotext, that sometimes grows over the screen, (not all text is visible at the bottom)
So i need scrolling event to scroll the html block.Hi,
please have a look at this example here:
Example: html div inside krpano with scrolling supportBest regards,
Klaus -
Klaus,
you heard it before, but I will say it too:
you are a genius!just for compleness i post my code here too:
The html form is generated by PHP on the server and by the plugin enabeled.
Code
Display More[...more code...] // inject the infopanl html form form = document.getElementById("infopanel_plugin"); form.style = ''; // make it visible form.addEventListener("mousewheel", function(event){ event.stopPropagation(); }, true); form.addEventListener("DOMMouseScroll", function(event){ event.stopPropagation(); }, true); form.addEventListener("touchstart", function(event){ if(krpano.device.ios && window.innerHeight == krpano.display.htmltarget.offsetHeight){ /* avoid the iOS 'overscrolling' for fullpage viewers */ var bs = document.body.parentNode.style; bs.position="fixed"; bs.top=0; bs.left=0; bs.right=0; bs.bottom=0; } krpano.control.preventTouchEvents = false; event.stopPropagation(); }, true); form.addEventListener("touchend", function(event){ krpano.control.preventTouchEvents = true; event.stopPropagation(); }, true); form.addEventListener("gesturestart", function(event){ event.preventDefault(); }, true); plugin.sprite.appendChild(form); [...more code...]
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!