photonui.Viewport Class
Viewport.
Constructor
photonui.Viewport
()
Item Index
Methods
Properties
- __callbacks
- __events
- __html
- absolutePosition
- child
- childName
- containerNode
- contextMenu
- contextMenuName
- data
- height
- horizontalChildExpansion
- horizontalScrollbar
- html
- layoutOptions
- maxHeight
- maxWidth
- minHeight
- minWidth
- name
- offsetHeight
- offsetWidth
- padding
- parent
- parentName
- tooltip
- verticalChildExpansion
- verticalScrollbar
- visible
- width
Methods
__onContextMenu
(
private
-
event
Called when the context menu should be displayed.
Parameters:
-
event
Object
__onLocaleChanged
()
private
Called when the locale is changed.
_bindEvent
(
private
-
id
-
element
-
evName
-
callback
-
[options]
Javascript event binding (for internal use).
Parameters:
_buildHtml
()
private
Build the widget HTML.
_callCallbacks
(
private
-
wEvent
-
params
Call all callbacks for the given wEvent.
NOTE: the first argument passed to the callback is the current widget.
NOTEĀ²: if the thisArg of the callback is null, this will be binded to the current widget.
_sizingHack
()
private
HACK: set the right height.
_updateProperties
(
deprecated
private
-
properties
Force the update of the given properties.
This method is deprecated.
One should use '@photonui-update' abitbol's annotation on concerned properties.
Parameters:
-
properties
ArrayThe properties to update.
_visibilityChanged
(
private
-
visibility
Called when the visibility changes.
Parameters:
-
visibility
BooleanCurrent visibility state (otptional, defaut=this.visible)
addClass
(
-
className
Add a class to the outer HTML element of the widget.
Parameters:
-
className
StringThe class to add.
destroy
()
Destroy the widget.
hide
()
Hide the widget (equivalent to widget.visible = false).
registerCallback
(
-
id
-
wEvent
-
callback
-
thisArg
Register a callback for any PhotonUI/Widget event (called wEvent).
Callback signature:
function (Object(Base/Widget) [, arg1 [, arg2 [, ...]]])
removeChild
(
-
widget
Remove the given child.
Parameters:
-
widget
photonui.WidgetThe widget to remove/
removeClass
(
-
className
Remove a class from the outer HTML element of the widget.
Parameters:
-
className
StringThe class to remove.
show
()
Display the widget (equivalent to widget.visible = true).
unparent
()
Detache the widget from its parent.
Properties
__events
Object
private
Object containing references javascript events binding (for widget
internal use).
contextMenuName
String
The name of the managed contextual menu (
photonui.PopupWindow().name
).
Default: null (= no context menu)
height
Number
Height.
* Number: the size in px
* Infinity: 100% of the parent height
* null: auto
Default: Infinity
horizontalScrollbar
Boolean
Visibility of the horizontal scrollbar.
true
: displayed,false
: hidden,null
: auto.
Default: null
maxHeight
Number
Maximum height.
* Number: the size in px
* Infinity: 100% of the parent height
* null: no maximum height
Default: null
maxWidth
Number
Maximum width.
* Number: the size in px
* Infinity: 100% of the parent width
* null: no maximum width
Default: null
minHeight
Number
Minimum height.
* Number: the size in px
* Infinity: 100% of the parent height
* null: no minimum height
Default: null
minWidth
Number
Minimum width.
* Number: the size in px
* Infinity: 100% of the parent width
* null: no minimum width
Default: null
verticalScrollbar
Boolean
Visibility of the vertical scrollbar.
true
: displayed,false
: hidden,null
: auto.
Default: null
width
Number
Width.
* Number: the size in px
* Infinity: 100% of the parent width
* null: auto
Default: Infinity