dat.gui/controllers/controller.function.js

12 lines
389 B
JavaScript
Raw Normal View History

2011-02-02 18:12:55 +00:00
GUI.FunctionController = function() {
this.type = "function";
var that = this;
2011-02-02 18:12:55 +00:00
GUI.Controller.apply(this, arguments);
this.domElement.addEventListener('mousedown', function() {
that.object[that.propertyName].call(that.object);
}, false);
this.domElement.style.cursor = "pointer";
this.propertyNameElement.style.cursor = "pointer";
};
2011-02-02 18:12:55 +00:00
GUI.extendController(GUI.FunctionController);