Add ol.Rectangle.getSize

This commit is contained in:
Tom Payne
2012-07-17 22:37:21 +02:00
parent b31c3f90bd
commit 0d5bc44326
3 changed files with 18 additions and 0 deletions

View File

@@ -99,3 +99,11 @@ function testIntersects() {
assertNotIntersects(new ol.Rectangle(80, 120, 120, 140));
assertNotIntersects(new ol.Rectangle(120, 120, 140, 140));
}
function testSize() {
var rectangle = new ol.Rectangle(0, 1, 2, 4);
var size = rectangle.getSize();
assertEquals(2, size.width);
assertEquals(3, size.height);
}