PinchZoom.updateContainerOrigin renamed to updateContainerCenter

This commit is contained in:
Éric Lemoine
2011-11-10 21:40:46 +01:00
parent e6f2b0e294
commit 629e14d3c7
+4 -4
View File
@@ -76,10 +76,10 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
var activated = OpenLayers.Control.prototype.activate.apply(this,arguments); var activated = OpenLayers.Control.prototype.activate.apply(this,arguments);
if (activated) { if (activated) {
this.map.events.on({ this.map.events.on({
moveend: this.updateContainerOrigin, moveend: this.updateContainerCenter,
scope: this scope: this
}); });
this.updateContainerOrigin(); this.updateContainerCenter();
} }
return activated; return activated;
}, },
@@ -95,7 +95,7 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
var deactivated = OpenLayers.Control.prototype.deactivate.apply(this,arguments); var deactivated = OpenLayers.Control.prototype.deactivate.apply(this,arguments);
if (this.map && this.map.events) { if (this.map && this.map.events) {
this.map.events.un({ this.map.events.un({
moveend: this.updateContainerOrigin, moveend: this.updateContainerCenter,
scope: this scope: this
}); });
} }
@@ -106,7 +106,7 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
* Method: updateContainerCenter * Method: updateContainerCenter
* Must be called each time the layer container moves. * Must be called each time the layer container moves.
*/ */
updateContainerOrigin: function() { updateContainerCenter: function() {
var container = this.map.layerContainerDiv; var container = this.map.layerContainerDiv;
// the layer container div is a square of 100px/100px // the layer container div is a square of 100px/100px
this.containerCenter = { this.containerCenter = {