Using buttonclick event to avoid issues on touch devices.

This commit is contained in:
ahocevar
2012-03-03 22:21:01 +01:00
parent 9860d60518
commit 221f299650
2 changed files with 22 additions and 19 deletions

View File

@@ -44,7 +44,7 @@
map.setCenter([0, 0], 0);
t.eq(map.getZoom(), 0, "initial center");
control.zoomInLink.onclick();
control.events.triggerEvent("buttonclick", {buttonElement: control.zoomInLink});
t.eq(map.getZoom(), 1, "after zoom in");
map.destroy();
}
@@ -61,7 +61,7 @@
map.setCenter([0, 0], 1);
t.eq(map.getZoom(), 1, "initial center");
control.zoomOutLink.onclick();
control.events.triggerEvent("buttonclick", {buttonElement: control.zoomOutLink});
t.eq(map.getZoom(), 0, "after zoom out");
map.destroy();
}