Better precision for right and top corners
This commit is contained in:
@@ -538,7 +538,7 @@
|
||||
// do not defer moveGriddedTiles
|
||||
var isNative = OpenLayers.Animation.isNative;
|
||||
OpenLayers.Animation.isNative = true;
|
||||
t.plan(2);
|
||||
t.plan(3);
|
||||
|
||||
var map = new OpenLayers.Map("map", {projection: "EPSG:3857"});
|
||||
var layer = new OpenLayers.Layer.WMS("wms", "../../img/blank.gif");
|
||||
@@ -547,11 +547,12 @@
|
||||
map.pan(2, -100);
|
||||
map.zoomIn();
|
||||
t.eq(layer.grid[1][0].bounds, new OpenLayers.Bounds(-10018754.17, 0, 0, 10018754.17), "no floating point errors after zooming");
|
||||
map.zoomTo(14);
|
||||
map.setCenter([0, 0], 14);
|
||||
var bounds = layer.grid[0][0].bounds.clone();
|
||||
map.pan(260, 520);
|
||||
map.pan(-260, -520);
|
||||
t.eq(layer.grid[0][0].bounds, bounds, "no floating point errors after dragging back and forth");
|
||||
t.eq(bounds.right, 0, "0 is 0, and not some super small number");
|
||||
|
||||
map.destroy();
|
||||
OpenLayers.Animation.isNative = isNative;
|
||||
|
||||
Reference in New Issue
Block a user