Class pwlib.guiFloatingPanel
A floating panel GUI element.
Defined in: script.js.
Constructor Attributes | Constructor Name and Description |
---|---|
<private> |
pwlib.guiFloatingPanel(gui, container)
|
Field Attributes | Field Name and Description |
---|---|
Reference to the floating panel element.
|
|
The panel content element.
|
|
Custom application events interface.
|
|
Floating panel ID.
|
|
Tells the state of the floating panel: hidden/minimized/visible or if it's
being dragged.
|
|
<constant> |
Panel state: the user is dragging the floating panel.
|
<constant> |
Panel state: hidden.
|
<constant> |
Panel state: minimized.
|
<constant> |
Panel state: visible.
|
The viewport element.
|
Method Attributes | Method Name and Description |
---|---|
Bring the panel to the top.
|
|
<private> <inner> |
ev_close(ev)
The
click event handler for the panel Close button element. |
<private> <inner> |
ev_minimize(ev)
The
click event handler for the panel Minimize button element. |
<private> <inner> |
ev_mousedown(ev)
The
mousedown event handler. |
<private> <inner> |
ev_mousemove(ev)
The
mousemove event handler. |
<private> <inner> |
ev_mouseup(ev)
The
mouseup event handler. |
hide()
Hide the panel.
|
|
<private> <inner> |
init()
Initialize the floating panel.
|
show()
Show the panel.
|
|
toggle()
Toggle the panel visibility.
|
- Parameters:
- {pwlib.gui} gui
- Reference to the PaintWeb GUI object.
- {Element} container
- Reference to the DOM element you want to transform into a floating panel.
click
event handler for the panel Close button element.
This hides the floating panel.
This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.
- Parameters:
- {Event} ev
- The DOM Event object.
click
event handler for the panel Minimize button element.
This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.
- Parameters:
- {Event} ev
- The DOM Event object.
mousedown
event handler. This is invoked when you start
dragging the floating panel.
This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.
- Parameters:
- {Event} ev
- The DOM Event object.
mousemove
event handler. This performs the actual move of
the floating panel.
- Parameters:
- {Event} ev
- The DOM Event object.
mouseup
event handler. This ends the panel drag operation.
This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.
- Parameters:
- {Event} ev
- The DOM Event object.
This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.
This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.
This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.