Own applyTransform method is no longer needed
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Util/vendorPrefix.js
|
||||
* @requires OpenLayers/Handler/Pinch.js
|
||||
*/
|
||||
|
||||
@@ -111,19 +110,7 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.map.applyTransform(dx, dy, scale);
|
||||
this.currentCenter = current;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: applyTransform
|
||||
* Applies the given transform to layers.
|
||||
*/
|
||||
applyTransform: function(transform) {
|
||||
var style = this.map.layerContainerDiv.style;
|
||||
var transformProperty = OpenLayers.Util.vendorPrefix.style("transform");
|
||||
if (transformProperty) {
|
||||
style[transformProperty] = transform;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Method: pinchDone
|
||||
*
|
||||
@@ -135,7 +122,7 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
|
||||
* of the pinch gesture. This give us the final scale of the pinch.
|
||||
*/
|
||||
pinchDone: function(evt, start, last) {
|
||||
this.applyTransform("");
|
||||
this.map.applyTransform();
|
||||
var zoom = this.map.getZoomForResolution(this.map.getResolution() / last.scale, true);
|
||||
if (zoom !== this.map.getZoom() || !this.currentCenter.equals(this.pinchOrigin)) {
|
||||
var resolution = this.map.getResolutionForZoom(zoom);
|
||||
|
||||
Reference in New Issue
Block a user