[Mapbender-commits] r5294 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jan 6 11:03:09 EST 2010


Author: christoph
Date: 2010-01-06 11:03:05 -0500 (Wed, 06 Jan 2010)
New Revision: 5294

Added:
   trunk/mapbender/http/plugins/jq_ui_resizable.js
Log:


Added: trunk/mapbender/http/plugins/jq_ui_resizable.js
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_resizable.js	                        (rev 0)
+++ trunk/mapbender/http/plugins/jq_ui_resizable.js	2010-01-06 16:03:05 UTC (rev 5294)
@@ -0,0 +1,66 @@
+/**
+ * Package: <Application element name>
+ *
+ * Description:
+ * <A description>
+ * 
+ * Files:
+ *  - <path and filename, like http/javascripts/mod_zoomIn1.php>
+ *
+ * SQL:
+ * > <SQL for element> 
+ * > 
+ * > <SQL for element var> 
+ *
+ * Help:
+ * http://www.mapbender.org/<wiki site name>
+ *
+ * Maintainer:
+ * http://www.mapbender.org/User:<user>
+ * 
+ * Parameters:
+ * <normal element var name>      - <type and description>
+ * <optional element var name>    - *[optional]* <type and description>
+ * <deprecated element var name>  - *[deprecated]* <type and description>
+ *
+ * License:
+ * Copyright (c) 2009, Open Source Geospatial Foundation
+ * This program is dual licensed under the GNU General Public License 
+ * and Simplified BSD license.  
+ * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+ */
+Mapbender.events.init.register(function () {
+	options.$target.each(function () {
+		var $currentTarget = $(this);
+		var id = $currentTarget.attr("id");
+		var $maps = $("#" + id + ":maps");
+
+		
+		$maps.resizable({
+			handles: 'se',
+			start: function () {
+				var mapsContainerId = $maps.attr("id") + "_maps";
+				$maps.children(":not(#" + mapsContainerId + ")").hide();
+			},
+			stop: function () {
+				var id = $currentTarget.attr("id");
+				$maps.mapbender(function () {
+					
+					var w = parseInt($currentTarget.css("width"), 10);
+					var h = parseInt($currentTarget.css("height"), 10);
+					
+					var sw = this.convertPixelToReal(new Mapbender.Point(0, h));
+					var ne = this.convertPixelToReal(new Mapbender.Point(w, 0));
+
+					this.setWidth(w);
+					this.setHeight(h);
+
+					this.calculateExtent(new Extent(sw, ne));	
+					this.setMapRequest();
+
+					$maps.children().show();
+				});
+			}
+		});
+	});
+});
\ No newline at end of file



More information about the Mapbender_commits mailing list