[Mapbender-commits] r9010 - in branches/2.7: http/plugins lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jul 29 05:08:07 PDT 2014


Author: verenadiewald
Date: 2014-07-29 05:08:07 -0700 (Tue, 29 Jul 2014)
New Revision: 9010

Modified:
   branches/2.7/http/plugins/mb_print.php
   branches/2.7/lib/printbox.js
Log:
allow free scale selection f?\195?\188r print

Modified: branches/2.7/http/plugins/mb_print.php
===================================================================
--- branches/2.7/http/plugins/mb_print.php	2014-07-29 11:38:38 UTC (rev 9009)
+++ branches/2.7/http/plugins/mb_print.php	2014-07-29 12:08:07 UTC (rev 9010)
@@ -186,7 +186,7 @@
 					if (typeof(obj) == "object") {
 						if (obj.scale) {
     						if($("#scale").is("input")) {
-    							jqForm[0].scale.value = parseInt(obj.scale / 10, 10) * 10;
+    							jqForm[0].scale.value = parseInt(obj.scale, 10);
     						}
     						else {
     							//$("#scale .addedScale").remove();
@@ -644,6 +644,9 @@
 	 */
 	var buildForm = function () {
 		$(".print_option_dyn").remove();
+		$("#printboxScale").remove();
+		$("#printboxCoordinates").remove();
+		$("#printboxAngle").remove();
 		var str = "";
 		str += '<input type="hidden" name="printboxScale" id="printboxScale">\n';
 		str += '<input type="hidden" name="printboxCoordinates" id="printboxCoordinates">\n';

Modified: branches/2.7/lib/printbox.js
===================================================================
--- branches/2.7/lib/printbox.js	2014-07-29 11:38:38 UTC (rev 9009)
+++ branches/2.7/lib/printbox.js	2014-07-29 12:08:07 UTC (rev 9010)
@@ -393,7 +393,7 @@
 		var coordsArray = coords.split(",");		
 	
 		xtentx =  coordsArray[2] - coordsArray[0];
-		scale = parseInt(Math.ceil(xtentx / (printWidth / 100)), 10);
+		scale = parseInt(Math.round(xtentx / (printWidth / 100)), 10);
 		return scale;
 	};
 



More information about the Mapbender_commits mailing list