[fusion-commits] r1722 - in trunk: . widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Dec 18 15:28:52 EST 2008


Author: pagameba
Date: 2008-12-18 15:28:52 -0500 (Thu, 18 Dec 2008)
New Revision: 1722

Modified:
   trunk/build.xml
   trunk/widgets/Legend.js
   trunk/widgets/Maptip.js
Log:
Fixes #196.  Position maptip slightly further away from the cursor and hide it on mouse down so it doesn't interfere with other tools as much.

Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2008-12-18 19:51:54 UTC (rev 1721)
+++ trunk/build.xml	2008-12-18 20:28:52 UTC (rev 1722)
@@ -76,7 +76,7 @@
   <property name="app.path" value="/${app.name}"/>
   <property name="app.version" value="1.1.x"/>
   <property name="build.home" value="${basedir}/build"/>
-  <property name="deploy.home" value="${env.HTDOCS}/${app.name}"/>
+  <property name="deploy.home" value="${basedir}/../${app.name}"/>
   <property name="dist.home" value="${basedir}/dist"/>
   <property name="docs.home" value="${build.home}/docs"/>
 

Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js	2008-12-18 19:51:54 UTC (rev 1721)
+++ trunk/widgets/Legend.js	2008-12-18 20:28:52 UTC (rev 1722)
@@ -332,6 +332,16 @@
             if (item instanceof Jx.TreeFolder) {
                 this.recurseTree(op, item);
                 item[op]();
+                if (item.domObj) {
+                    var p = $(item.domObj).getPrevious();
+                    if (p) {
+                        item.domObj.dispose();
+                        $(item.domObj).inject(p, 'before');
+                    } else {
+                        p = $(item.domObj).getParent();
+                        $(item.domObj).inject(p, 'top');
+                    }
+                }
             }
         }
     },

Modified: trunk/widgets/Maptip.js
===================================================================
--- trunk/widgets/Maptip.js	2008-12-18 19:51:54 UTC (rev 1721)
+++ trunk/widgets/Maptip.js	2008-12-18 20:28:52 UTC (rev 1722)
@@ -56,7 +56,7 @@
     aLayers: null,
     bOverTip: false,
     sWinFeatures: 'menubar=no,location=no,resizable=no,status=no',
-    offset: new OpenLayers.Pixel(2,2),
+    offset: new OpenLayers.Pixel(0,20),
     
     initializeWidget: function(widgetTag) {
         var json = widgetTag.extension;
@@ -100,6 +100,7 @@
         document.getElementsByTagName('BODY')[0].appendChild(this.domObj);
         
         this.getMap().observeEvent('mousemove', OpenLayers.Function.bind(this.mouseMove, this));
+        this.getMap().observeEvent('mousedown', OpenLayers.Function.bind(this._hide, this));
         this.getMap().observeEvent('mouseout', OpenLayers.Function.bind(this.mouseOut, this));
         
     },



More information about the fusion-commits mailing list