Add docs for 'hideable' option.

This commit is contained in:
Don McCurdy 2018-03-11 15:23:23 -07:00
parent f3cdfde17f
commit 10d5a55040
2 changed files with 8 additions and 6 deletions

7
API.md
View File

@ -60,10 +60,11 @@ manipulate variables and fire functions on the fly.
| [params] | <code>Object</code> | | |
| [params.name] | <code>String</code> | | The name of this GUI. |
| [params.load] | <code>Object</code> | | JSON object representing the saved state of this GUI. |
| [params.auto] | <code>Boolean</code> | <code>true</code> | |
| [params.parent] | <code>dat.gui.GUI</code> | | The GUI I'm nested in. |
| [params.closed] | <code>Boolean</code> | | If true, starts closed |
| [params.closeOnTop] | <code>Boolean</code> | | If true, close/open button shows on top of the GUI |
| [params.autoPlace] | <code>Boolean</code> | <code>true</code> | |
| [params.hideable] | <code>Boolean</code> | <code>true</code> | If true, GUI is closed by the <kbd>h</kbd> keypress. |
| [params.closed] | <code>Boolean</code> | <code>false</code> | If true, starts closed |
| [params.closeOnTop] | <code>Boolean</code> | <code>false</code> | If true, close/open button shows on top of the GUI |
**Example**
```js

View File

@ -80,10 +80,11 @@ const hideableGuis = [];
* @param {String} [params.name] The name of this GUI.
* @param {Object} [params.load] JSON object representing the saved state of
* this GUI.
* @param {Boolean} [params.auto=true]
* @param {dat.gui.GUI} [params.parent] The GUI I'm nested in.
* @param {Boolean} [params.closed] If true, starts closed
* @param {Boolean} [params.closeOnTop] If true, close/open button shows on top of the GUI
* @param {Boolean} [params.autoPlace=true]
* @param {Boolean} [params.hideable=true] If true, GUI is shown/hidden by <kbd>h</kbd> keypress.
* @param {Boolean} [params.closed=false] If true, starts closed
* @param {Boolean} [params.closeOnTop=false] If true, close/open button shows on top of the GUI
*/
const GUI = function(pars) {
const _this = this;