[fusion-commits] r3058 - trunk/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Mar 30 01:38:02 PDT 2023


Author: jng
Date: 2023-03-30 01:38:01 -0700 (Thu, 30 Mar 2023)
New Revision: 3058

Modified:
   trunk/widgets/CoordinateTracker.js
Log:
Make coordinate tracker more robust. Patch by Pierre Cardinal.

Fixes https://trac.osgeo.org/mapguide/ticket/2851

Modified: trunk/widgets/CoordinateTracker.js
===================================================================
--- trunk/widgets/CoordinateTracker.js	2022-10-10 12:44:43 UTC (rev 3057)
+++ trunk/widgets/CoordinateTracker.js	2023-03-30 08:38:01 UTC (rev 3058)
@@ -40,7 +40,14 @@
     },
     activate: function() {
         if (this.taskPane) {
-            this.taskPane.loadDisplayPanel();
+            if (this.taskPane.taskPaneWin == null) {
+                this.taskPane.loadDisplayPanel();
+            } 
+            else {
+                if (typeof this.taskPane.taskPaneWin.bReady === 'undefined') {
+                    this.taskPane.loadDisplayPanel();
+                }
+            }
         }
     },
     deactivate: function() {
@@ -121,6 +128,11 @@
         var bReady = false;
         try {
             bReady = this.taskPaneWin.bReady;
+            if (typeof bReady === 'undefined') {
+                var initFunction = OpenLayers.Function.bind(this.initPanel, this);
+                setTimeout(initFunction, 300);
+                return;
+            }	
         } catch (e) {
             if (!bReady) {
                 var initFunction = OpenLayers.Function.bind(this.initPanel, this);



More information about the fusion-commits mailing list