diff --git a/controllers/controller.boolean.js b/controllers/controller.boolean.js index 2cb68b3..1d2ceb9 100644 --- a/controllers/controller.boolean.js +++ b/controllers/controller.boolean.js @@ -7,6 +7,14 @@ GUI.BooleanController = function() { var input = document.createElement('input'); input.setAttribute('type', 'checkbox'); + if(arguments[3]) { + input.checked = true; + this.setValue(true); + } else { + input.checked = false; + this.setValue(false); + } + this.domElement.addEventListener('click', function(e) { input.checked = !input.checked; e.preventDefault();