onorientation event, change layout --> resize

hi,

I want to adjust every layout in may mobile app when on orientation event is fired but no luck…

this is my code:

window.onorientationchange = function () {

    setTimeout(function () {
        anchura = screen.width; 

        //refrescamos layouts

        $$("mainMenu").define("width", anchura - cabeceraAnchura);
        $$("mainMenu").resize();
       
    }, 200);

mainMenu is a layout

any help please? i tried reconstruct, resize and resize children and this event is inside onload event.

Thanks!

Hi,

could you please explain the issue in detail: why don’t you use full-screen layout ? Webix layouts allows to set gravity, minWidth, maxWidth.

However, the approach that you are using:

layoutCol.define("width",newWidth);
layoutCol.resize();

can be used to set the new column width.

thanks Maria!