mobile and landscape

Hello
Is there a built-in way to detect if the mobile phone browser is in landscape or portrait mode?
Thansk
Marco

Hello @mdissel ,
As a solution, you can try to use an onRotate event specific for touch devices:

webix.attachEvent("onRotate", function(orientation){
    //your code here
});

Ok, but how about the initial loading?

Hello @mdissel ,
It can be done via Javascript native screen.orientation property - the current screen orientation value.

Is it an idea to add this to the webix library?

webix.ui.landscape = ((screen.orientation || {}).angle || window.orientation) !== 0

@mdissel
you can use simple orientation detector

function isLandscape(){
    return window.innerWidth > window.innerHeight;
}