Prevent Landscape Screen


#1

there is a way to prevent a specific resolution to be used?


#2

Hi Paolo,

there’s no way at the moment but we’ll investigate it for the next update.


#3

tanks i will enjoy it


#4

Hi,
with switch control and javascript code in its transformer script we can verify some windows attributes.

regards Paolo

console.log(navigator);
var deviceAgent = navigator.userAgent.toLowerCase();

var isTouchDevice = false ;
if (navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPad/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/) ||
navigator.userAgent.match(/Windows Phone/i) ||
navigator.userAgent.match(/ZuneWP7/i)
) {
// some code
isTouchDevice = true;
}
console.log(isTouchDevice)
if (window.innerWidth >= 1024) {
isTouchDevice = false

}
else
{
isTouchDevice = true;
}
alert(window.innerWidth);
if (isTouchDevice) {
input = “0”
} else {
input = “1”
}
return input;


#5

Build 361 with PWA display orientation setting (can be found in Project Map’s App Settings block) is now available. It should update when you launch React Studio.