[mapguide-commits] r6434 - in
trunk/MgDev/Oem/fusionMG/templates/mapguide: aqua limegold
maroon slate turquoiseyellow
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jan 17 02:40:40 EST 2012
Author: liuar
Date: 2012-01-16 23:40:40 -0800 (Mon, 16 Jan 2012)
New Revision: 6434
Modified:
trunk/MgDev/Oem/fusionMG/templates/mapguide/aqua/index.html
trunk/MgDev/Oem/fusionMG/templates/mapguide/limegold/index.html
trunk/MgDev/Oem/fusionMG/templates/mapguide/maroon/index.html
trunk/MgDev/Oem/fusionMG/templates/mapguide/slate/index.html
trunk/MgDev/Oem/fusionMG/templates/mapguide/turquoiseyellow/index.html
Log:
on behalf of libr (Bruce li)
Reason:
There are many handlers for the Event - MAP_LOADED of Map, one of them deregister itself after executed while other handlers have not executed, this action disturb the sequence of the execution of handlers behind.
solution:
Remove the code of deregistering Eventhandler. take another way to disable the Eventhandler.
Modified: trunk/MgDev/Oem/fusionMG/templates/mapguide/aqua/index.html
===================================================================
--- trunk/MgDev/Oem/fusionMG/templates/mapguide/aqua/index.html 2012-01-16 13:36:41 UTC (rev 6433)
+++ trunk/MgDev/Oem/fusionMG/templates/mapguide/aqua/index.html 2012-01-17 07:40:40 UTC (rev 6434)
@@ -177,14 +177,13 @@
mapWidget.registerForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
}
+var isTaskPaneRegistered = false;
+
var initPanelHandler = function() {
+ if(isTaskPaneRegistered) return;
//register this with MAP_LOADED so that the initial layout will remain
Fusion.registerForEvent(Fusion.Event.TASK_PANE_LOADED, showTaskPane);
-
- // The initPanelHandler is used to register task pane, which only needs once.
- // So we should remove the register to avoid initPanelHandler to be called multiple times.
- var mapWidget = Fusion.getMapById('Map');
- mapWidget.deregisterForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
+ isTaskPaneRegistered = true;
}
var showOverviewMap = function() {
Modified: trunk/MgDev/Oem/fusionMG/templates/mapguide/limegold/index.html
===================================================================
--- trunk/MgDev/Oem/fusionMG/templates/mapguide/limegold/index.html 2012-01-16 13:36:41 UTC (rev 6433)
+++ trunk/MgDev/Oem/fusionMG/templates/mapguide/limegold/index.html 2012-01-17 07:40:40 UTC (rev 6434)
@@ -164,14 +164,13 @@
mapWidget.registerForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
}
+var isTaskPaneRegistered = false;
+
var initPanelHandler = function() {
+ if(isTaskPaneRegistered) return;
//register this with MAP_LOADED so that the initial layout will remain
Fusion.registerForEvent(Fusion.Event.TASK_PANE_LOADED, showTaskPane);
-
- // The initPanelHandler is used to register task pane, which only needs once.
- // So we should remove the register to avoid initPanelHandler to be called multiple times.
- var mapWidget = Fusion.getMapById('Map');
- mapWidget.deregisterForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
+ isTaskPaneRegistered = true;
}
var showOverviewMap = function() {
Modified: trunk/MgDev/Oem/fusionMG/templates/mapguide/maroon/index.html
===================================================================
--- trunk/MgDev/Oem/fusionMG/templates/mapguide/maroon/index.html 2012-01-16 13:36:41 UTC (rev 6433)
+++ trunk/MgDev/Oem/fusionMG/templates/mapguide/maroon/index.html 2012-01-17 07:40:40 UTC (rev 6434)
@@ -186,14 +186,13 @@
mapWidget.registerForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
}
+var isTaskPaneRegistered = false;
+
var initPanelHandler = function() {
+ if(isTaskPaneRegistered) return;
//register this with MAP_LOADED so that the initial layout will remain
Fusion.registerForEvent(Fusion.Event.TASK_PANE_LOADED, showTaskPane);
-
- // The initPanelHandler is used to register task pane, which only needs once.
- // So we should remove the register to avoid initPanelHandler to be called multiple times.
- var mapWidget = Fusion.getMapById('Map');
- mapWidget.deregisterForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
+ isTaskPaneRegistered = true;
}
var showOverviewMap = function() {
Modified: trunk/MgDev/Oem/fusionMG/templates/mapguide/slate/index.html
===================================================================
--- trunk/MgDev/Oem/fusionMG/templates/mapguide/slate/index.html 2012-01-16 13:36:41 UTC (rev 6433)
+++ trunk/MgDev/Oem/fusionMG/templates/mapguide/slate/index.html 2012-01-17 07:40:40 UTC (rev 6434)
@@ -167,14 +167,13 @@
mapWidget.registerForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
}
+var isTaskPaneRegistered = false;
+
var initPanelHandler = function() {
+ if(isTaskPaneRegistered) return;
//register this with MAP_LOADED so that the initial layout will remain
Fusion.registerForEvent(Fusion.Event.TASK_PANE_LOADED, showTaskPane);
-
- // The initPanelHandler is used to register task pane, which only needs once.
- // So we should remove the register to avoid initPanelHandler to be called multiple times.
- var mapWidget = Fusion.getMapById('Map');
- mapWidget.deregisterForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
+ isTaskPaneRegistered = true;
}
var showOverviewMap = function() {
Modified: trunk/MgDev/Oem/fusionMG/templates/mapguide/turquoiseyellow/index.html
===================================================================
--- trunk/MgDev/Oem/fusionMG/templates/mapguide/turquoiseyellow/index.html 2012-01-16 13:36:41 UTC (rev 6433)
+++ trunk/MgDev/Oem/fusionMG/templates/mapguide/turquoiseyellow/index.html 2012-01-17 07:40:40 UTC (rev 6434)
@@ -152,14 +152,13 @@
mapWidget.registerForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
}
+var isTaskPaneRegistered = false;
+
var initPanelHandler = function() {
+ if(isTaskPaneRegistered) return;
//register this with MAP_LOADED so that the initial layout will remain
Fusion.registerForEvent(Fusion.Event.TASK_PANE_LOADED, showTaskPane);
-
- // The initPanelHandler is used to register task pane, which only needs once.
- // So we should remove the register to avoid initPanelHandler to be called multiple times.
- var mapWidget = Fusion.getMapById('Map');
- mapWidget.deregisterForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
+ isTaskPaneRegistered = true;
}
var showOverviewMap = function() {
More information about the mapguide-commits
mailing list