Conditional Mouse Wheel

Q&A about the latest versions
Post Reply
Howard
Posts: 209
Joined: Wed Jun 03, 2009 5:58 am

mouseWheel.jpg
mouseWheel.jpg (35.07 KiB) Viewed 1931 times
Consider this a feature request please.
When I place a pano into a web page, I disable the mouse wheel, as it's confusing to the end user when the mouse wheel zooms the pano at the same time it scrolls the web page.

But when I create a version of the same pano for direct hand-held access, I must make a seperate pano.xml file with the mouse wheel enabled so that the user can pinch-zoom the scene.

It would be great to be able to make the enabling of the mouse wheel conditional upon the user's device
Perhaps this is something that is currently possible using skin attributes, but if so I've not found it.

Thanks!
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Howard,
You use a GoTo URL action with the following code:

Code: Select all

javascript:
pano.setLockedWheel(false);
You can use false or true, this is to lock the mouse wheel.
Use this with an Action Filter, Has Touch, = true

So start the project with the Mouse Wheel disabled.
The hard part is finding a source action to trigger the action that you can use in your project.
As an example, you can use a Mouse Click action with a splash screen, if on a touch screen device you will use the click but also detect Has Touch so will turn on the Mouse Wheel for Pinc Zoom.

You can Alos use a Config Loaded, with an Action Folter looking ay iOS and Android.
This will work with all but iPads.

You can also use a Player State Changed action with a Has Touch Action Filter, but you need to Rotate the device to activate the play state change.
As an example, open the project on a phone and it will not pinch zoom, rotate the phone then it will.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Howard
Posts: 209
Joined: Wed Jun 03, 2009 5:58 am

Thanks, Hopki.

I'll give these a try.

Howard
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Howard,
As an FYI, in the next point release, 6.1.10 the Has Touch will trigger a player state change.

Under the HTML5 output and the Control tab set Mouse Wheel: Disabled.

Then in any element add the action:

Player State Change, Go to URL, URL: javascript: pano.setLockedWheel(false);

Then add the action filter:
Has Touch = true

So on output open, it will lock the mouse wheel.
But on "touch", this will cause a player state change and trigger the action to unlock the wheel, which will allow pinch zoom.

Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Howard
Posts: 209
Joined: Wed Jun 03, 2009 5:58 am

It worked with "on config" and "is mobile."

https://allaroundnevada.com/wp-content/ ... /combined/

Thanks for this solution!

Howard
Post Reply