I read article http://docs.webix.com/desktop__responsive_layout.html but I still wonder what is the correct way of building typical UI that look good for both desktop and mobile.
For example, I need on desktop UI to have two columns, left with list of items and right with main widgets. And for mobile I want left column to be hidden, but instead menu should be added on top of right column.
I’m using something like this to achieve this:
webix.ui({
type:"line",
responsive:true,
cols: [
{ view:"list", id:"leftMenu",
data:["Users", "Reports", "Settings"],
ready:function(){
this.select(this.getFirstId());
if ($$('leftMenu').isVisible()) $$('headerMenu').hide();
else $$('headerMenu').show();
}
},
mainUI
]
});
webix.event(window, "resize", function(){
webix.delay(function(){
if ($$('leftMenu').isVisible()) $$('headerMenu').hide();
else $$('headerMenu').show();
}, this, [], 500);
});
But I’m not sure that this is correct or easiest solution