Finds the panel and returns its object.
get(type)

type | string, name of the panel

#### Description

The first argument type is the name of the panel. It can be one of the following:

- top
- left
- main
- right
- preview
- bottom

If the panel does not exists in w2layout.panels array, the method will return null. Below is a structure of the panel object: 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 content: '', // content of the pane, 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 } Because JavaScript passes objects by reference, changing the returned object will change the original. The better way to change panel properties is using w2layout.set() method, which will also apply changes on the screen.
Below is an example how to find panel object: $('#layout').w2layout({ name : 'layout', panels : [ { type: 'top', size: 40 }, { type: 'main', content: 'This is main panel' }, { type: 'preview', size: 200, hidden: true } ] }); console.log(w2ui['layout'].get('preview'));