New private movePyPx method to avoid going through all the unnecessary pixel-lonlat conversions. p=elemoine,me (closes #3062)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11535 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -211,6 +211,22 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
|
||||
OpenLayers.Layer.prototype.setZIndex.apply(this, arguments);
|
||||
this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: moveByPx
|
||||
* Move the layer based on pixel vector. To be implemented by subclasses.
|
||||
*
|
||||
* Parameters:
|
||||
* dx - {Number} The x coord of the displacement vector.
|
||||
* dy - {Number} The y coord of the displacement vector.
|
||||
*/
|
||||
moveByPx: function(dx, dy) {
|
||||
OpenLayers.Layer.prototype.moveByPx.apply(this, arguments);
|
||||
|
||||
if (this.dragPanMapObject) {
|
||||
this.dragPanMapObject(dx, -dy);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: moveTo
|
||||
|
||||
Reference in New Issue
Block a user