Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

A problem for a widget with preload="minimized"

$
0
0
Got a problem for a widget with preload="minimized". After the widget is opened and then closed, it does not return to "minimized" state. But this widget's icon on the toolbar is still underlined with a yellow bar, and this widget is actually disappeared on the UI.
I believe that the problem is caused by the approach as described below:
I set each widget id (e.g. the widget below id="3"), and then run the even below (revised the code from Robert) in the widget. Once some widgets are closed, the actual id may change and then it causes the problem.
Therefore, I am considering in the event below, if the opened widget can be identified not by widget id (that defined in config.xml should be removed), this problem may be solvable.
Welcome your solution for it. Thanks.

----------

private function wTemplate_openHandler(event:Event):void {
for each (var widgetId:Number in ViewerContainer.getInstance().widgetManager.getAllLoadedWidgetIds()) {
if(widgetId != 3) {
var data:Object = {
id: widgetId,
state: WidgetStates.WIDGET_MINIMIZED
};
AppEvent.dispatch(AppEvent.WIDGET_CHANGE_STATE, data);
}
}
}

Viewing all articles
Browse latest Browse all 2097

Trending Articles