[OpenLayers-Commits] r4785 - trunk/openlayers/lib/OpenLayers/Control
commits at openlayers.org
commits at openlayers.org
Wed Oct 3 12:19:05 EDT 2007
Author: euzuro
Date: 2007-10-03 12:19:04 -0400 (Wed, 03 Oct 2007)
New Revision: 4785
Modified:
trunk/openlayers/lib/OpenLayers/Control/PanZoom.js
Log:
Allow user to specify the 'slideFactor' for the default panzoom control. (Closes #996)
Modified: trunk/openlayers/lib/OpenLayers/Control/PanZoom.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Control/PanZoom.js 2007-10-03 16:17:55 UTC (rev 4784)
+++ trunk/openlayers/lib/OpenLayers/Control/PanZoom.js 2007-10-03 16:19:04 UTC (rev 4785)
@@ -15,7 +15,8 @@
/**
* APIProperty: slideFactor
- * {Integer}
+ * {Integer} Number of pixels by which we'll pan the map in any direction
+ * on clicking the arrow buttons.
*/
slideFactor: 50,
@@ -154,16 +155,16 @@
switch (this.action) {
case "panup":
- this.map.pan(0, -50);
+ this.map.pan(0, -this.slideFactor);
break;
case "pandown":
- this.map.pan(0, 50);
+ this.map.pan(0, this.slideFactor);
break;
case "panleft":
- this.map.pan(-50, 0);
+ this.map.pan(-this.slideFactor, 0);
break;
case "panright":
- this.map.pan(50, 0);
+ this.map.pan(this.slideFactor, 0);
break;
case "zoomin":
this.map.zoomIn();
More information about the Commits
mailing list