API Docs for: 1.8.0
Show:

photonui.Base Class

Defined in: src/base.js:43
Module: PhotonUI

Base class for all PhotonUI Classes.

wEvents:

  • destroy:
    • description: called before the widget was destroyed.
    • callback: function (widget)

Constructor

photonui.Base

(
  • params
)

Defined in src/base.js:43

Parameters:

  • params Object

    An object that can contain any property that will be set to the class (optional).

Methods

_bindEvent

(
  • id
  • element
  • evName
  • callback
  • [options]
)
private

Defined in src/base.js:229

Javascript event binding (for internal use).

Parameters:

  • id String

    An unique id for the event.

  • element DOMElement

    The element on which the event will be bind.

  • evName String

    The event name (e.g. "mousemove", "click",...).

  • callback Function

    The function that will be called when the event occured.

  • [options] Object optional

    options for addEventListener

_callCallbacks

(
  • wEvent
  • params
)
private

Defined in src/base.js:292

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.

Parameters:

  • wEvent String

    The widget event.

  • params Array

    Parametters that will be sent to the callbacks.

_registerWEvents

(
  • wEvents
)
private

Defined in src/base.js:276

Register available wEvent.

Parameters:

_unbindEvent

(
  • id
)
private

Defined in src/base.js:257

Unbind javascript event.

Parameters:

  • id String

    The id of the event.

_updateProperties

(
  • properties
)
deprecated private

Defined in src/base.js:209

Force the update of the given properties.

This method is deprecated. One should use '@photonui-update' abitbol's annotation on concerned properties.

Parameters:

  • properties Array

    The properties to update.

destroy

()

Defined in src/base.js:157

Destroy the class.

registerCallback

(
  • id
  • wEvent
  • callback
  • thisArg
)

Defined in src/base.js:169

Register a callback for any PhotonUI/Widget event (called wEvent).

Callback signature:

function (Object(Base/Widget) [, arg1 [, arg2 [, ...]]])

Parameters:

  • id String

    An unique id for the callback.

  • wEvent String

    the PhotonUI/Widget event name.

  • callback Function

    The callback function.

  • thisArg Object

    The value of this (optionnal, default = current widget).

removeCallback

(
  • id
)

Defined in src/base.js:193

Remove a registered callback.

Parameters:

  • id String

    The id of the callback.

Properties

__callbacks

Object private

Defined in src/base.js:142

Object containing references to registered callbacks.

__events

Object private

Defined in src/base.js:132

Object containing references javascript events binding (for widget internal use).

data

Object

Defined in src/base.js:113

Arbitrary data

Default: {}