mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Add some missing methods to API docs.
This commit is contained in:
parent
af282f908c
commit
c83d4ce46a
36
API.md
36
API.md
@ -274,6 +274,10 @@ An "abstract" class that represents a given property of an object.
|
|||||||
* [.domElement](#Controller+domElement) : <code>DOMElement</code>
|
* [.domElement](#Controller+domElement) : <code>DOMElement</code>
|
||||||
* [.object](#Controller+object) : <code>Object</code>
|
* [.object](#Controller+object) : <code>Object</code>
|
||||||
* [.property](#Controller+property) : <code>String</code>
|
* [.property](#Controller+property) : <code>String</code>
|
||||||
|
* [.options(options)](#Controller+options) ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
* [.name(name)](#Controller+name) ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
* [.listen()](#Controller+listen) ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
* [.remove()](#Controller+remove) ⇒ [<code>Controller</code>](#Controller)
|
||||||
* [.onChange(fnc)](#Controller+onChange) ⇒ [<code>Controller</code>](#Controller)
|
* [.onChange(fnc)](#Controller+onChange) ⇒ [<code>Controller</code>](#Controller)
|
||||||
* [.onFinishChange(fnc)](#Controller+onFinishChange) ⇒ [<code>Controller</code>](#Controller)
|
* [.onFinishChange(fnc)](#Controller+onFinishChange) ⇒ [<code>Controller</code>](#Controller)
|
||||||
* [.setValue(newValue)](#Controller+setValue)
|
* [.setValue(newValue)](#Controller+setValue)
|
||||||
@ -308,6 +312,38 @@ The object to manipulate
|
|||||||
The name of the property to manipulate
|
The name of the property to manipulate
|
||||||
|
|
||||||
**Kind**: instance property of [<code>Controller</code>](#Controller)
|
**Kind**: instance property of [<code>Controller</code>](#Controller)
|
||||||
|
<a name="Controller+options"></a>
|
||||||
|
|
||||||
|
### controller.options(options) ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
**Kind**: instance method of [<code>Controller</code>](#Controller)
|
||||||
|
|
||||||
|
| Param | Type |
|
||||||
|
| --- | --- |
|
||||||
|
| options | <code>Array</code> \| <code>Object</code> |
|
||||||
|
|
||||||
|
<a name="Controller+name"></a>
|
||||||
|
|
||||||
|
### controller.name(name) ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
Sets the name of the controller.
|
||||||
|
|
||||||
|
**Kind**: instance method of [<code>Controller</code>](#Controller)
|
||||||
|
|
||||||
|
| Param | Type |
|
||||||
|
| --- | --- |
|
||||||
|
| name | <code>string</code> |
|
||||||
|
|
||||||
|
<a name="Controller+listen"></a>
|
||||||
|
|
||||||
|
### controller.listen() ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
Sets controller to listen for changes on its underlying object.
|
||||||
|
|
||||||
|
**Kind**: instance method of [<code>Controller</code>](#Controller)
|
||||||
|
<a name="Controller+remove"></a>
|
||||||
|
|
||||||
|
### controller.remove() ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
Removes the controller from its parent GUI.
|
||||||
|
|
||||||
|
**Kind**: instance method of [<code>Controller</code>](#Controller)
|
||||||
<a name="Controller+onChange"></a>
|
<a name="Controller+onChange"></a>
|
||||||
|
|
||||||
### controller.onChange(fnc) ⇒ [<code>Controller</code>](#Controller)
|
### controller.onChange(fnc) ⇒ [<code>Controller</code>](#Controller)
|
||||||
|
@ -883,7 +883,11 @@ function augmentController(gui, li, controller) {
|
|||||||
controller.__li = li;
|
controller.__li = li;
|
||||||
controller.__gui = gui;
|
controller.__gui = gui;
|
||||||
|
|
||||||
common.extend(controller, {
|
common.extend(controller, /** @lends Controller.prototype */ {
|
||||||
|
/**
|
||||||
|
* @param {Array|Object} options
|
||||||
|
* @return {Controller}
|
||||||
|
*/
|
||||||
options: function(options) {
|
options: function(options) {
|
||||||
if (arguments.length > 1) {
|
if (arguments.length > 1) {
|
||||||
const nextSibling = controller.__li.nextElementSibling;
|
const nextSibling = controller.__li.nextElementSibling;
|
||||||
@ -916,16 +920,29 @@ function augmentController(gui, li, controller) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
name: function(v) {
|
/**
|
||||||
controller.__li.firstElementChild.firstElementChild.innerHTML = v;
|
* Sets the name of the controller.
|
||||||
|
* @param {string} name
|
||||||
|
* @return {Controller}
|
||||||
|
*/
|
||||||
|
name: function(name) {
|
||||||
|
controller.__li.firstElementChild.firstElementChild.innerHTML = name;
|
||||||
return controller;
|
return controller;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets controller to listen for changes on its underlying object.
|
||||||
|
* @return {Controller}
|
||||||
|
*/
|
||||||
listen: function() {
|
listen: function() {
|
||||||
controller.__gui.listen(controller);
|
controller.__gui.listen(controller);
|
||||||
return controller;
|
return controller;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the controller from its parent GUI.
|
||||||
|
* @return {Controller}
|
||||||
|
*/
|
||||||
remove: function() {
|
remove: function() {
|
||||||
controller.__gui.remove(controller);
|
controller.__gui.remove(controller);
|
||||||
return controller;
|
return controller;
|
||||||
|
Loading…
Reference in New Issue
Block a user