Missed a switch from this.map -> this on mouseDefaults. Dragging was

broken.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@219 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-05-21 03:12:53 +00:00
parent 0033ba70a9
commit e97ccc7dd4

View File

@@ -63,14 +63,14 @@ OpenLayers.Control.MouseDefaults.prototype =
this.zoomBox.style.top = evt.xy.y+"px";
}
} else {
var deltaX = this.map.mouseDragStart.x - evt.xy.x;
var deltaY = this.map.mouseDragStart.y - evt.xy.y;
var deltaX = this.mouseDragStart.x - evt.xy.x;
var deltaY = this.mouseDragStart.y - evt.xy.y;
var size = this.map.getSize();
var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX,
size.h / 2 + deltaY);
var newCenter = this.map.getLonLatFromPixel( newXY );
this.map.setCenter(newCenter);
this.map.mouseDragStart = evt.xy.copyOf();
this.mouseDragStart = evt.xy.copyOf();
}
}
},