Disable Zooming
Disable Zooming
I'd like to create a full screen app for an android tablet but don't want to allow zooming/panning the content, is it possible to disable that?
Re: Disable Zooming
Start your code with
Code: Select all
;// No Zoom
! var meta = document.createElement('meta');
! meta.name = "viewport";
! meta.content = "width=device-width, user-scalable=no";
! document.getElementsByTagName('head')[0].appendChild(meta);
➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
➽ http://falsam.com
Sorry for my poor english
Re: Disable Zooming
I will add this in for all mobile app, as it makes no sens to zoom/pan an app
Re: Disable Zooming
Great, thank you.Fred wrote:I will add this in for all mobile app, as it makes no sens to zoom/pan an app
Maybe you will be able to give us a hint some time, which enhancements of SpiderBasic are planned for the next year or so - this would be perfect.
Re: Disable Zooming
And now this is a big pain in applications that need scaling.
You need to make it possible to both enable scaling and disable it. Now we need to implement hacks and this does not work in the Android application on first launch. Example:
Code: Select all
OpenWindow(0, 100, 100, 320, 200, "Window", #PB_Window_Background )
ButtonGadget(0, 10, 200, 200, 60, "Multiline Button Multiline Button Multiline Button Multiline Button", #PB_Button_MultiLine)
! document.querySelector("meta[name=viewport]").setAttribute('content', 'width=device-width, initial-scale=1.0, user-scalable=1');
! $('html, head, body, .spiderwindow, .spiderwindow div:first-child, .spiderwindow-background, .spiderwindow-background div:first-child').css("touch-action", "auto");
Re: Disable Zooming
Hello, also a huge request to enable scaling