Own applyTransform method is no longer needed

This commit is contained in:
ahocevar
2012-12-15 10:55:23 +01:00
parent 25c8b0ceaf
commit c03f1dc9bf
+2 -15
View File
@@ -4,7 +4,6 @@
* full text of the license. */ * full text of the license. */
/** /**
* @requires OpenLayers/Util/vendorPrefix.js
* @requires OpenLayers/Handler/Pinch.js * @requires OpenLayers/Handler/Pinch.js
*/ */
@@ -111,19 +110,7 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
this.map.applyTransform(dx, dy, scale); this.map.applyTransform(dx, dy, scale);
this.currentCenter = current; 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 * 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. * of the pinch gesture. This give us the final scale of the pinch.
*/ */
pinchDone: function(evt, start, last) { pinchDone: function(evt, start, last) {
this.applyTransform(""); this.map.applyTransform();
var zoom = this.map.getZoomForResolution(this.map.getResolution() / last.scale, true); var zoom = this.map.getZoomForResolution(this.map.getResolution() / last.scale, true);
if (zoom !== this.map.getZoom() || !this.currentCenter.equals(this.pinchOrigin)) { if (zoom !== this.map.getZoom() || !this.currentCenter.equals(this.pinchOrigin)) {
var resolution = this.map.getResolutionForZoom(zoom); var resolution = this.map.getResolutionForZoom(zoom);