mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
added unListenTo method
This commit is contained in:
parent
c3fd69b95a
commit
b1631b0327
8
gui.js
8
gui.js
@ -217,7 +217,13 @@ var GUI = function() {
|
||||
};
|
||||
|
||||
this.unlistenTo = function(controller) {
|
||||
// TODO
|
||||
// TODO: test this
|
||||
for(var i = 0; i < listening.length; i++) {
|
||||
if(listening[i] == controller) listening.splice(i, 1);
|
||||
}
|
||||
if(listening.length <= 0) {
|
||||
clearInterval(listenInterval);
|
||||
}
|
||||
};
|
||||
|
||||
this.listen = function(whoToListenTo) {
|
||||
|
Loading…
Reference in New Issue
Block a user