|
@@ -70,13 +70,6 @@ interface IInstanceTracker<T extends Widget> extends IDisposable {
|
|
*/
|
|
*/
|
|
readonly widgetAdded: ISignal<this, T>;
|
|
readonly widgetAdded: ISignal<this, T>;
|
|
|
|
|
|
- /**
|
|
|
|
- * Get a widget with a specified ID that is held by the tracker.
|
|
|
|
- *
|
|
|
|
- * @param - id The ID string of the widget.
|
|
|
|
- */
|
|
|
|
- getWidgetById(id: string): T | null;
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Iterate through each widget in the tracker.
|
|
* Iterate through each widget in the tracker.
|
|
*
|
|
*
|
|
@@ -230,25 +223,6 @@ class InstanceTracker<T extends Widget> implements IInstanceTracker<T>, IDisposa
|
|
tracker.dispose();
|
|
tracker.dispose();
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * Get a widget with a specified ID that is held by the tracker.
|
|
|
|
- *
|
|
|
|
- * @param - id The ID string of the widget.
|
|
|
|
- */
|
|
|
|
- getWidgetById(id: string): T | null {
|
|
|
|
- let result: T = null;
|
|
|
|
- each(this._tracker.widgets, widget => {
|
|
|
|
- // If a result has already been found, short circuit.
|
|
|
|
- if (result) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (widget.id === id) {
|
|
|
|
- result = widget;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return result;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Find the first widget in the tracker that satisfies a filter function.
|
|
* Find the first widget in the tracker that satisfies a filter function.
|
|
*
|
|
*
|