typo in ZoomBox. Thanks avlee for spotting this and the patch. r=me (closes #1413)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6432 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -54,7 +54,7 @@ OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
var pixHeight = Math.abs(position.top-position.bottom);
|
var pixHeight = Math.abs(position.top-position.bottom);
|
||||||
var zoomFactor = Math.min((this.map.size.h / pixHeight),
|
var zoomFactor = Math.min((this.map.size.h / pixHeight),
|
||||||
(this.map.size.w / pixWidth));
|
(this.map.size.w / pixWidth));
|
||||||
var extent = map.getExtent();
|
var extent = this.map.getExtent();
|
||||||
var center = this.map.getLonLatFromPixel(
|
var center = this.map.getLonLatFromPixel(
|
||||||
position.getCenterPixel());
|
position.getCenterPixel());
|
||||||
var xmin = center.lon - (extent.getWidth()/2)*zoomFactor;
|
var xmin = center.lon - (extent.getWidth()/2)*zoomFactor;
|
||||||
|
|||||||
Reference in New Issue
Block a user