[fusion-commits] r2411 - in trunk: lib widgets/QuickPlot

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri Jul 8 00:26:48 EDT 2011


Author: liuar
Date: 2011-07-07 21:26:48 -0700 (Thu, 07 Jul 2011)
New Revision: 2411

Modified:
   trunk/lib/ApplicationDefinition.js
   trunk/widgets/QuickPlot/PreviewDialog.js
Log:
Fix quickplot cannot display issue

Modified: trunk/lib/ApplicationDefinition.js
===================================================================
--- trunk/lib/ApplicationDefinition.js	2011-07-05 19:09:52 UTC (rev 2410)
+++ trunk/lib/ApplicationDefinition.js	2011-07-08 04:26:48 UTC (rev 2411)
@@ -694,6 +694,14 @@
         this.mapWidget.setMenu();
         $(this.mapWidgetTag.name).widget = this.mapWidget;
 
+        //create the floating map message
+        this.mapWidget.message = new Fusion.MapMessage(this.mapWidget.oMapOL.viewPortDiv);
+        this.mapWidget.registerForEvent(Fusion.Event.MAP_EXTENTS_CHANGED, (function(){
+                if (this.message != null){
+                    this.message.refreshLayout();
+                }
+            }).bind(this.mapWidget));
+            
         //create all the other widgets for the widget set
         for (var i=0; i<this.widgetTags.length; i++) {
             this.widgetTags[i].create(this);

Modified: trunk/widgets/QuickPlot/PreviewDialog.js
===================================================================
--- trunk/widgets/QuickPlot/PreviewDialog.js	2011-07-05 19:09:52 UTC (rev 2410)
+++ trunk/widgets/QuickPlot/PreviewDialog.js	2011-07-08 04:26:48 UTC (rev 2411)
@@ -102,7 +102,6 @@
         }
         
         this.isClosing = true;
-        this.jxDialog.blanket.fade(0);
         this.jxDialog.domObj.fade(0);
     },
     
@@ -125,7 +124,19 @@
         {
             // Resize the preview frame according to the monitor resolution
             this.innerDoc         = this.previewFrame.contentWindow.document;
-            var box       = $(document.body).getDimensions();
+            
+            // This is a workaround for JxLib3.0, which disable the getDimensions for Body.
+            //var box       = $(document.body).getDimensions();
+            var box =  null;
+            if($("AppContainer") != null)
+            {
+                box =$("AppContainer").getDimensions();
+            }
+            else
+            {
+                box =$("thePage").getDimensions();
+            }
+            
             // Width of preview dialog = screen width * factor
             var factor    = 0.5;
             this.previewContainer = $(this.innerDoc.getElementById("PreviewContainer"));
@@ -196,7 +207,6 @@
             var size      = container.getMarginBoxSize();
             this.jxDialog.resize(size.width + delta.x, size.height + delta.y, true);
             
-            this.jxDialog.blanket.fade(0.2);
             this.jxDialog.domObj.fade(1);
             this.resizeIsPending = false;
             
@@ -204,7 +214,6 @@
         }
         else
         {
-            this.jxDialog.blanket.setOpacity(0);
             this.jxDialog.domObj.setOpacity(0);
             this.resizeIsPending = true;
         }



More information about the fusion-commits mailing list