mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
12 lines
468 B
JavaScript
12 lines
468 B
JavaScript
var FunctionController = function() {
|
|
this.type = "function";
|
|
var _this = this;
|
|
Controller.apply(this, arguments);
|
|
this.domElement.addEventListener('click', function() {
|
|
_this.object[_this.propertyName].call(_this.object);
|
|
}, false);
|
|
this.domElement.style.cursor = "pointer";
|
|
this.propertyNameElement.style.cursor = "pointer";
|
|
};
|
|
FunctionController.prototype = new Controller();
|
|
FunctionController.prototype.constructor = FunctionController; |