Add scale to ol.Rectangle

This commit is contained in:
Éric Lemoine
2013-01-29 15:41:27 +01:00
parent 35a6cac37f
commit aa9f820723
2 changed files with 24 additions and 0 deletions

View File

@@ -98,6 +98,17 @@ describe('ol.Rectangle', function() {
});
});
describe('scale', function() {
it('scales the extent', function() {
var rectangle = new ol.Rectangle(1, 1, 3, 3);
rectangle.scale(2);
expect(rectangle.minX).toEqual(0);
expect(rectangle.minY).toEqual(0);
expect(rectangle.maxX).toEqual(4);
expect(rectangle.maxY).toEqual(4);
});
});
});
goog.require('ol.Coordinate');