mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
update GUI.remove
Remove controllers from __listening when removing them
This commit is contained in:
parent
581e482823
commit
c6aa3fff6c
@ -545,9 +545,11 @@ define([
|
||||
*/
|
||||
remove: function (controller) {
|
||||
|
||||
// TODO listening?
|
||||
this.__ul.removeChild(controller.__li);
|
||||
this.__controllers.splice(this.__controllers.indexOf(controller), 1);
|
||||
var ixl = this.__listening.indexOf(controller);
|
||||
if (ixl > 0)
|
||||
this.__listening.pop(ixl);
|
||||
this.__controllers.pop(this.__controllers.indexOf(controller));
|
||||
var _this = this;
|
||||
common.defer(function () {
|
||||
_this.onResize();
|
||||
|
Loading…
Reference in New Issue
Block a user