EasyUI
Portal
Extension » Portal
Step 1: Create an HTML Page
Step 2: Create the Portal
Step 3: Add panel widgets to this portal
Properties
| Name | Type | Description | Default |
|---|---|---|---|
| width | number | The width of portal. | auto |
| height | number | The height of portal. | auto |
| border | boolean | Defines if to show portal border. | false |
| fit | boolean | When true to set the portal size fit it's parent container. | false |
| dir | string | The dragging direction, h(horizontal) or v(vertical). | v |
Events
| Name | Parameters | Description |
|---|---|---|
| onStateChange | panel | Fires when users drag and drop a panel. |
| onResize | width,height | Fires when the portal size is changed. |
Methods
| Name | Parameter | Description |
|---|---|---|
| options | none | Return the options object. |
| resize | param |
Set the portal size, the 'param' parameter contains following properties: width: the new width of portal. height: the new height of portal. |
| getPanels | columnIndex | Get the specified column panels, when columnIndex parameter is not assigned, return all panels. |
| add | param |
Add a new panel, the 'param' parameter contains following properties: panel: the panel object to be added. columnIndex: the column index to be inserted. rowIndex: the row index to be inserted. This parameter is available only when the 'dir' is set to 'h'. |
| remove | panel | Remove and destroy the specified panel. |
| disableDragging | panel | Disable the dragging feature for a panel. |
| enableDragging | panel | Enable the dragging feature for a panel. |
