From cc382eb263f49a587c25148b2faa5dca81b1701a Mon Sep 17 00:00:00 2001 From: nein09 Date: Fri, 16 Jan 2015 15:45:04 -0800 Subject: [PATCH] add refpoint to zoom tests. --- test/viewport.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/viewport.js b/test/viewport.js index cf6b020c..063ce24d 100644 --- a/test/viewport.js +++ b/test/viewport.js @@ -291,6 +291,15 @@ testZoomLevels[i], "Zoomed by the correct amount." ); + + // now use a ref point + viewport.zoomBy(testZoomLevels[i], testPoints[i], true); + viewport.update(); + propEqual( + viewport.getZoom(), + testZoomLevels[i], + "Zoomed by the correct amount." + ); } start(); @@ -313,6 +322,15 @@ testZoomLevels[i], "Zoomed to the correct level." ); + + // now use a ref point + viewport.zoomTo(testZoomLevels[i], testPoints[i], true); + viewport.update(); // need to call this even with immediately=true + propEqual( + viewport.getZoom(), + testZoomLevels[i], + "Zoomed to the correct level." + ); } start();