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:
@@ -63,14 +63,14 @@ OpenLayers.Control.MouseDefaults.prototype =
|
|||||||
this.zoomBox.style.top = evt.xy.y+"px";
|
this.zoomBox.style.top = evt.xy.y+"px";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var deltaX = this.map.mouseDragStart.x - evt.xy.x;
|
var deltaX = this.mouseDragStart.x - evt.xy.x;
|
||||||
var deltaY = this.map.mouseDragStart.y - evt.xy.y;
|
var deltaY = this.mouseDragStart.y - evt.xy.y;
|
||||||
var size = this.map.getSize();
|
var size = this.map.getSize();
|
||||||
var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX,
|
var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX,
|
||||||
size.h / 2 + deltaY);
|
size.h / 2 + deltaY);
|
||||||
var newCenter = this.map.getLonLatFromPixel( newXY );
|
var newCenter = this.map.getLonLatFromPixel( newXY );
|
||||||
this.map.setCenter(newCenter);
|
this.map.setCenter(newCenter);
|
||||||
this.map.mouseDragStart = evt.xy.copyOf();
|
this.mouseDragStart = evt.xy.copyOf();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user