Jump to content

Detect screen orientation


Bocchi

Recommended Posts

If yes, can you try this approach ?!:

 

MainForm -> Script:

window.addEventListener('orientationchange', function(event){
    switch(window.orientation){
        case -90: case 90:
            // landscape
            alert("landscape");
            break;
        default:
            // portrait
            alert("portrait");
    }
})
Link to comment
Share on other sites

  • 6 years later...
On 6/22/2017 at 3:34 AM, Sherzod said:

Hi,

 

 

MainmForm -> ClientEvents -> ExtEvents -> window.orientationchange fn:

function window.orientationchange(eOpts)
{

}

Best regards,

How can I lock the screen orientation?

I've already tried some options but I can't be successful.

Could you give any tips?

Link to comment
Share on other sites

14 hours ago, mikromundo said:

How can I lock the screen orientation?

Are you using a mobile browser?

14 hours ago, mikromundo said:

I've already tried some options but I can't be successful.

What exactly did you try?

 

In any case, I think at the moment this is impossible if you use a mobile browser in the usual sense.

Link to comment
Share on other sites

  • 4 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...