Controller
Direct Subclass:
Base class for all xeokit-ui components.
Method Summary
| Public Methods | ||
| public |
destroy() Destroys this Controller. |
|
| public |
Logs an error for this Controller to the JavaScript console. |
|
| public |
Fires an event on this Controller. |
|
| public |
Gets whether or not this Controller is active. |
|
| public |
Gets whether or not this Controller is enabled. |
|
| public |
Logs a console debugging message for this Controller. |
|
| public |
Cancels an event subscription that was previously made with Controller#on or Controller#once. |
|
| public |
Subscribes to an event on this Controller. |
|
| public |
Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is handled. |
|
| public |
Activates or deactivates this Controller. |
|
| public |
setEnabled(enabled: boolean) Enables or disables this Controller. |
|
| public |
Logs a warning for this Controller to the JavaScript console. |
|
Public Methods
public error(message: String) source
Logs an error for this Controller to the JavaScript console.
The console message will have this format: [ERROR] [<component type> =<component id>: <message>
Params:
| Name | Type | Attribute | Description |
| message | String | The message to log |
public fire(event: String, value: Object, forget: Boolean) source
Fires an event on this Controller.
public log(message: String) source
Logs a console debugging message for this Controller.
The console message will have this format: [LOG] [<component type> <component id>: <message>
Params:
| Name | Type | Attribute | Description |
| message | String | The message to log |
public off(subId: String) source
Cancels an event subscription that was previously made with Controller#on or Controller#once.
Params:
| Name | Type | Attribute | Description |
| subId | String | Subscription ID |
public on(event: String, callback: Function, scope: Object): String source
Subscribes to an event on this Controller.
The callback is be called with this component as scope.
public once(event: String, callback: Function, scope: Object) source
Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is handled.
This is equivalent to calling Controller#on, and then calling Controller#off inside the callback function.
public setActive(active: boolean) source
Activates or deactivates this Controller.
Fires an "active" event on update.
Params:
| Name | Type | Attribute | Description |
| active | boolean | Whether or not to activate. |
Reference
Source
