#917 point.bounds needs to be non-null before the resize/rotate/move - thanks pgiraud for catching my sloppiness here
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3999 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -73,6 +73,7 @@
|
|||||||
|
|
||||||
var dx = 10 * Math.random();
|
var dx = 10 * Math.random();
|
||||||
var dy = 10 * Math.random();
|
var dy = 10 * Math.random();
|
||||||
|
point.bounds = "foo";
|
||||||
point.move(dx, dy);
|
point.move(dx, dy);
|
||||||
t.eq(point.x, x + dx, "move() correctly modifies x");
|
t.eq(point.x, x + dx, "move() correctly modifies x");
|
||||||
t.eq(point.y, y + dy, "move() correctly modifies y");
|
t.eq(point.y, y + dy, "move() correctly modifies y");
|
||||||
@@ -90,6 +91,7 @@
|
|||||||
var origin = new OpenLayers.Geometry.Point(5, 10);
|
var origin = new OpenLayers.Geometry.Point(5, 10);
|
||||||
|
|
||||||
// rotate a full revolution
|
// rotate a full revolution
|
||||||
|
point.bounds = "foo";
|
||||||
point.rotate(2 * Math.PI, origin);
|
point.rotate(2 * Math.PI, origin);
|
||||||
t.ok(((point.x - x) / x) < tolerance,
|
t.ok(((point.x - x) / x) < tolerance,
|
||||||
"rotate by 2 * Math.PI returns to the same y");
|
"rotate by 2 * Math.PI returns to the same y");
|
||||||
@@ -113,7 +115,7 @@
|
|||||||
var x = 100 * Math.random();
|
var x = 100 * Math.random();
|
||||||
var y = 100 * Math.random();
|
var y = 100 * Math.random();
|
||||||
var point = new OpenLayers.Geometry.Point(x, y);
|
var point = new OpenLayers.Geometry.Point(x, y);
|
||||||
var bounds = point.getBounds();
|
point.bounds = "foo";
|
||||||
|
|
||||||
var i = 100 * Math.random();
|
var i = 100 * Math.random();
|
||||||
var j = 100 * Math.random();
|
var j = 100 * Math.random();
|
||||||
|
|||||||
Reference in New Issue
Block a user