Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Samstag, 14. April 2018, 16:49

How to block scrolling?

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?

2

Samstag, 14. April 2018, 21:34

Hi,

set the 'mwheel' and optionally also the 'capturetouch' embedding settings to false:
https://krpano.com/docu/html/#mwheel

Best regards,
Klaus

3

Sonntag, 15. April 2018, 11:27

It is very unobvious for me where to set the value "false" in the .js file. Can you help me please?

Best regards, Alex
»Alex_U« hat folgendes Bild angehängt:
  • 7.jpg

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Alex_U« (15. April 2018, 11:55)


4

Montag, 16. April 2018, 19:13

Hi,

that's a setting for the embedding code in the html file (see the documentation link above)!
That means no editing of any .js or .xml files.

Look in the .html file for:

Quellcode

1
embedpano({...});

and change it to:

Quellcode

1
embedpano({..., mwheel:false, capturetouch:false});


Best regards,
Klaus

5

Montag, 16. April 2018, 22:17

Klaus, Many thanks! I figured it out!

6

Mittwoch, 30. Mai 2018, 16:08

dynamic on/off capturetouch?

Hi,

that's a setting for the embedding code in the html file (see the documentation link above)!
That means no editing of any .js or .xml files.

Look in the .html file for:

Quellcode

1
embedpano({...});

and change it to:

Quellcode

1
embedpano({..., mwheel:false, capturetouch:false});


Best regards,
Klaus


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?

7

Mittwoch, 30. Mai 2018, 16:24

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 support

Best regards,
Klaus

8

Mittwoch, 30. Mai 2018, 16:44

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.


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[...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...]