Move pixel/coordinate matrices into frame state, remove canRotate

This commit is contained in:
Tom Payne
2013-01-12 23:56:13 +01:00
parent a927385e72
commit 9764e76975
9 changed files with 71 additions and 133 deletions

View File

@@ -43,9 +43,7 @@ ol.interaction.DragPan.prototype.handleDrag = function(mapBrowserEvent) {
var rotation = view.getRotation();
var delta =
new ol.Coordinate(-resolution * this.deltaX, resolution * this.deltaY);
if (map.canRotate() && goog.isDef(rotation)) {
delta.rotate(rotation);
}
delta.rotate(rotation);
var newCenter = new ol.Coordinate(
this.startCenter.x + delta.x, this.startCenter.y + delta.y);
map.requestRenderFrame();