dat.gui/controllers/controller.function.js

12 lines
385 B
JavaScript
Raw Permalink Normal View History

GUI.FunctionController = function() {
this.type = "function";
var that = this;
GUI.Controller.apply(this, arguments);
this.domElement.addEventListener('click', function() {
that.object[that.propertyName].call(that.object);
}, false);
this.domElement.style.cursor = "pointer";
this.propertyNameElement.style.cursor = "pointer";
};
GUI.extendController(GUI.FunctionController);