How detect touch mode in perspective session


I’d like to know is there any trick to know when perspective session change to touch mode in broswer.
And also can I force to toggle this mode? Like chrome debug app. Something like full screen feature of broswer which now can be toggle in perspective script

There can some info be found in sessionprops device.userAgent and device.type
To know if you are on a windows/browser or an andorid or something
But other then that there isnt really a way to detect if you are a touchscreen (that i know off) from perspective. And you cant change it.

entering chrome debug mode can be done with
ctrl +shit +i followed by ctrl+shift+m But that proabbly not what you need xd

what about javascript and creating module for that?

Even with Javascript it doesn’t seem like there’s any totally reliable way to do this:

Doesnt seem like there is a surefire way to find out, why do you need it tho? If you expect touch and mouse events you should program them both anyway?

I create a view with panning and zooming functionality with the mouse when the user switch to touch mode I need to disable it because in this mode browser has pitch and zoom by default.

1 Like

And the pitch/zoom intereferes with your functionality? Cant you make yours only work with mouseclick event?

That is exactly what I want to do I want to disable those functionality in touch enable Device so my page work on that devices too

how did you make the panning/zooming functionality now?

Hi Victor
I just use mouse and wheel events to do this and try to transfer whole root by it.
It is hard for me and but eventually it works compare to map component the performance is not good.

Yea thats never gonna work as good without javascript