[Mapbender-commits] r8105 - branches/2.7/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Sep 6 06:45:23 EDT 2011


Author: verenadiewald
Date: 2011-09-06 03:45:23 -0700 (Tue, 06 Sep 2011)
New Revision: 8105

Modified:
   branches/2.7/lib/printbox.js
Log:
don't use a filledPolygon any more to move the print box, because IE can't display the filled opacity, use instead a center point for moving print box

Modified: branches/2.7/lib/printbox.js
===================================================================
--- branches/2.7/lib/printbox.js	2011-09-06 06:51:25 UTC (rev 8104)
+++ branches/2.7/lib/printbox.js	2011-09-06 10:45:23 UTC (rev 8105)
@@ -22,7 +22,7 @@
 	var afterChangeSize = options.afterChangeSize || function (obj) {};
 	
 	// styles
-	var opacity = options.boxOpacity || 0.6;
+	var opacity = options.boxOpacity || 1;
 	var boxColour = options.boxColour || "#9999FF";
 	var frameColour = options.frameColour || "#000000";
 	var pointColour = options.pointColour || "#DD0000";
@@ -588,23 +588,36 @@
 		circleCanvas.paint();
 
 		boxCanvas.clear();
-		if (!boxTooBig()) {
-			boxCanvas.fillPolygon([
+
+                //don't use a filledPolygon any more to move the print box, because
+                //IE can't display the fill opacity, use instead a center point for moving print box
+                //if (!boxTooBig()) {
+			/*boxCanvas.fillPolygon([
 				pointArray[0].x + c.x,
 				pointArray[1].x + c.x,
 				pointArray[2].x + c.x,
 				pointArray[3].x + c.x
-			], 
+			],
 			[
 				pointArray[0].y + c.y,
 				pointArray[1].y + c.y,
 				pointArray[2].y + c.y,
 				pointArray[3].y + c.y
-			]);
-		}
-		else {
-			new Mb_warning("The print box is too big. The box is not filled.");
-		}
+			]);*/
+
+                    boxCanvas.setColor(pointColour);
+                    boxCanvas.fillEllipse(
+                            c.x - 4,
+                            c.y - 4,
+                            10,
+                            10
+                    );
+		//}
+		//else {
+		//	new Mb_warning("The print box is too big. The box is not filled.");
+		//}
+
+               
 		
 		// frame
 		boxCanvas.setColor(frameColour);	
@@ -677,7 +690,8 @@
 	$boxCanvas = $("#" + canvasName[0]);
 	$boxCanvas.css({
 		"opacity" : opacity, 
-		"filter" : "alpha(opacity=" + (opacity * 100) + ")"
+		"filter" : "alpha(opacity=" + (opacity * 100) + ")",
+                "cursor" : "move"
 	});
 		
 	var boxCanvas = jg[0];



More information about the Mapbender_commits mailing list