type | string, name of the panel |
panel: {
type: null, // type of the panel can be: left, right, top, bottom, preview
size: 100, // width or height of the panel depending on panel type
minSize: 20, // minimum size of the panel in px when it is resized
hidden: false, // indicates if panel is hidden
resizable: false, // indicates if panel is resizable
overflow: 'auto', // overflow property of the panel, can have same values as similar CSS property
style: '', // additional css styles for the panel
html: '', // content of the panel, can be a string or an object with .render(box) method
width: null, // width of the panel, read only
height: null, // height of the panel, read only
onRefresh: null, // refresh event for the panel
onShow: null, // show event for the panel
onHide: null // hide event for the panel
}
xxxxxxxxxx
let layout = new w2layout({
name : 'layout',
panels : [
{ type: 'top', size: 40 },
{ type: 'main', html: 'This is main panel' },
{ type: 'preview', size: 200, hidden: true }
]
});
console.log(w2ui.layout.get('preview'));