[OpenLayers-Commits] r11486 -
sandbox/ahocevar/layercontainer/lib/OpenLayers/Layer
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Fri Feb 25 07:23:57 EST 2011
Author: ahocevar
Date: 2011-02-25 04:23:53 -0800 (Fri, 25 Feb 2011)
New Revision: 11486
Modified:
sandbox/ahocevar/layercontainer/lib/OpenLayers/Layer/EventPane.js
Log:
make moveByPx work with EventPane layers (see #3096)
Modified: sandbox/ahocevar/layercontainer/lib/OpenLayers/Layer/EventPane.js
===================================================================
--- sandbox/ahocevar/layercontainer/lib/OpenLayers/Layer/EventPane.js 2011-02-25 12:17:19 UTC (rev 11485)
+++ sandbox/ahocevar/layercontainer/lib/OpenLayers/Layer/EventPane.js 2011-02-25 12:23:53 UTC (rev 11486)
@@ -211,6 +211,22 @@
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
More information about the Commits
mailing list