[Mapbender-commits] r9011 - in trunk/mapbender: http/plugins lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jul 29 05:09:42 PDT 2014
Author: verenadiewald
Date: 2014-07-29 05:09:42 -0700 (Tue, 29 Jul 2014)
New Revision: 9011
Modified:
trunk/mapbender/http/plugins/mb_print.php
trunk/mapbender/lib/printbox.js
Log:
allow free scale selection f?\195?\188r print
Modified: trunk/mapbender/http/plugins/mb_print.php
===================================================================
--- trunk/mapbender/http/plugins/mb_print.php 2014-07-29 12:08:07 UTC (rev 9010)
+++ trunk/mapbender/http/plugins/mb_print.php 2014-07-29 12:09:42 UTC (rev 9011)
@@ -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: trunk/mapbender/lib/printbox.js
===================================================================
--- trunk/mapbender/lib/printbox.js 2014-07-29 12:08:07 UTC (rev 9010)
+++ trunk/mapbender/lib/printbox.js 2014-07-29 12:09:42 UTC (rev 9011)
@@ -392,7 +392,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