Tiger,
In the jimu.js/mapManager.js _publishMapEvent frunction make these changes (lines 18 - 26):
_publishMapEvent: function(map) {
window._viewerMap = map;
MapUrlParamsHandler.postProcessUrlParams(this.urlParams, map);
console.timeEnd('Load Map');
if (this.map) {
this.map = map;
this.resetInfoWindow(true);
console.log('map changed.');
topic.publish('mapChanged', this.map, this.layerInfosObj);
} else {
this.map = map;
this.resetInfoWindow(true);
topic.publish('mapLoaded', this.map, this.layerInfosObj);
}
this.map.on("click", lang.hitch(this, function(evt){
var controller = window._widgetManager.getWidgetsByName("AnchorBarController")[0];
controller.openedIds.map(lang.hitch(this, function(wid){
var panelId = wid + '_panel';
window._panelManager.closePanel(panelId);
controller._removeFromOpenedIds(wid);
}));
}));
},