[fusion-commits] r1987 - sandbox/jxlib-3.0/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Nov 24 15:05:42 EST 2009


Author: pagameba
Date: 2009-11-24 15:05:41 -0500 (Tue, 24 Nov 2009)
New Revision: 1987

Modified:
   sandbox/jxlib-3.0/widgets/Legend.js
Log:
move image reference out of the if for layers that don't get their icons in the image strip.

Modified: sandbox/jxlib-3.0/widgets/Legend.js
===================================================================
--- sandbox/jxlib-3.0/widgets/Legend.js	2009-11-23 09:44:59 UTC (rev 1986)
+++ sandbox/jxlib-3.0/widgets/Legend.js	2009-11-24 20:05:41 UTC (rev 1987)
@@ -655,6 +655,7 @@
         
         var iconX = 0;
         var iconY = 0;
+        var img = item.elements.get('jxTreeIcon');
         if (style && style.iconX >= 0 && style.iconY >= 0) {
             /* calculate the size of the image that holds the icon
              * only once and cache the values as it is an expensive operation
@@ -662,7 +663,6 @@
              * image inside the image that holds it so that if the icon is
              * not the same size it is represented in a reasonable way
              */
-            var img = item.elements.get('jxTreeIcon');
             if (!this.offsetsCalculated) {
                 var parent = img.parentNode;
                 var sibling = img.getPrevious();



More information about the fusion-commits mailing list