Added hide/show functions to GUI instances to complement open/close

This commit is contained in:
David Wakelin 2019-03-27 09:32:01 +00:00 committed by Don McCurdy
parent 8cd1b4d2ae
commit d979883423

View File

@ -684,6 +684,20 @@ common.extend(
this.closed = true;
},
/**
* Hides the GUI.
*/
hide: function() {
this.domElement.style.display = 'none';
},
/**
* Shows the GUI.
*/
show: function() {
this.domElement.style.display = '';
},
onResize: function() {
// we debounce this function to prevent performance issues when rotating on tablet/mobile