From ba0ba64c7402b7d5ad251d0baa57e6f664d1d90a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 14 Feb 2013 22:13:07 +0100 Subject: [PATCH] Updating PinchZoom tests (see #800) With the map's applyTransform method, the control does not need and have its own applyTransform and center management any more. --- tests/Control/PinchZoom.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Control/PinchZoom.html b/tests/Control/PinchZoom.html index 3fc5ba6851..22db6a5039 100644 --- a/tests/Control/PinchZoom.html +++ b/tests/Control/PinchZoom.html @@ -95,23 +95,23 @@ var centerPx = map.getPixelFromLonLat(map.getCenter()); control.pinchStart = function(evt, pinchData) { - t.eq(control.pinchOrigin, centerPx, "center preserved"); - t.eq(control.currentCenter, centerPx, "center preserved"); + t.eq(map.layerContainerOriginPx, {x: 0, y: 0}, "center preserved"); + t.eq(map.getPixelFromLonLat(map.getCenter()), centerPx, "center preserved"); } control.pinchStart(null); var log = []; - control.applyTransform = function(transform) { - log.push(transform); + map.applyTransform = function(x, y, scale) { + log.push([x, y, scale]); } control.pinchOrigin = map.getPixelFromLonLat(map.getCenter()); var cases = [ - {scale: 1, transform: "translate(0px, 0px) scale(1)"}, - {scale: 2, transform: "translate(-128px, -128px) scale(2)"}, - {scale: 2.5, transform: "translate(-192px, -192px) scale(2.5)"}, - {scale: 0.25, transform: "translate(96px, 96px) scale(0.25)"} + {scale: 1, transform: [0, 0, 1]}, + {scale: 2, transform: [-128, -128, 2]}, + {scale: 2.5, transform: [-192, -192, 2.5]}, + {scale: 0.25, transform: [96, 96, 0.25]} ]; var len = cases.length;