[Dojo-checkins] r783 - src/webui
dojo-checkins at dojotoolkit.org
dojo-checkins at dojotoolkit.org
Mon Jun 27 16:32:04 PDT 2005
Author: dylan
Date: Mon Jun 27 16:32:02 2005
New Revision: 783
Modified:
src/webui/WidgetManager.js
Log:
add a braindead widget removeById method
Modified: src/webui/WidgetManager.js
==============================================================================
--- src/webui/WidgetManager.js (original)
+++ src/webui/WidgetManager.js Mon Jun 27 16:32:02 2005
@@ -31,6 +31,16 @@
delete this.widgetIds[tw];
this.widgets.splice(widgetIndex, 1);
}
+
+ // FIXME: suboptimal performance
+ this.removeById = function(id) {
+ for (var i=0; i<this.widgets.length; i++) {
+ if(this.widgets[i].widgetId == id) {
+ this.remove(i);
+ break;
+ }
+ }
+ }
this.getWidgetById = function(id){
return this.widgetIds[id];
More information about the Dojo-checkins
mailing list