[Commits] r1584 - sandbox/ahocevar/playground/ux/Printing/ux/data

commits at geoext.org commits at geoext.org
Mon Dec 14 10:10:08 CET 2009


Author: ahocevar
Date: 2009-12-14 10:10:08 +0100 (Mon, 14 Dec 2009)
New Revision: 1584

Modified:
   sandbox/ahocevar/playground/ux/Printing/ux/data/PrintPage.js
   sandbox/ahocevar/playground/ux/Printing/ux/data/PrintProvider.js
Log:
fixed issue with missing customParams object; don't use limitSigDigs any more

Modified: sandbox/ahocevar/playground/ux/Printing/ux/data/PrintPage.js
===================================================================
--- sandbox/ahocevar/playground/ux/Printing/ux/data/PrintPage.js	2009-12-13 16:54:29 UTC (rev 1583)
+++ sandbox/ahocevar/playground/ux/Printing/ux/data/PrintPage.js	2009-12-14 09:10:08 UTC (rev 1584)
@@ -206,12 +206,12 @@
         this.printProvider.scales.each(function(rec){
             var scale = rec.get("value");
             var bounds = this.calculatePageBounds(scale);
-            var d = Math.abs((bounds.getHeight() / 2) - dist).limitSigDigs(8);
+            var d = Math.abs((bounds.getHeight() / 2) - dist);
             scaleFits.push(d);
-            distHash[d] = scale;
+            distHash[d.toPrecision(8)] = scale;
         }, this);
         var min = scaleFits.concat().sort(function(a,b){return a<b?-1:1;})[0];
-        var scale = distHash[min];
+        var scale = distHash[min.toPrecision(8)];
         
         var bounds = this.calculatePageBounds(scale);
         var geom = bounds.toGeometry();

Modified: sandbox/ahocevar/playground/ux/Printing/ux/data/PrintProvider.js
===================================================================
--- sandbox/ahocevar/playground/ux/Printing/ux/data/PrintProvider.js	2009-12-13 16:54:29 UTC (rev 1583)
+++ sandbox/ahocevar/playground/ux/Printing/ux/data/PrintProvider.js	2009-12-14 09:10:08 UTC (rev 1584)
@@ -365,7 +365,8 @@
             type: 'WMS',
             layers: [layer.params.LAYERS].join(",").split(","),
             format: layer.params.FORMAT,
-            styles: [layer.params.STYLES].join(",").split(",")
+            styles: [layer.params.STYLES].join(",").split(","),
+            customParams: {}
         });
         var param;
         for (var p in layer.params) {



More information about the Commits mailing list