Implement translate function for circle geometry

This commit is contained in:
Frederic Junod
2019-04-11 16:04:25 +02:00
parent 319a905ec0
commit 2989c84248
2 changed files with 22 additions and 1 deletions

View File

@@ -281,6 +281,16 @@ describe('ol.geom.Circle', function() {
expect(circle.getExtent()).to.eql(extent);
});
});
describe('#translate', function() {
it('translates the circle', function() {
circle.setCenter([1, 1]);
circle.translate(5, 10);
expect(circle.getCenter()).to.eql([6, 11]);
expect(circle.getExtent()).to.eql([5, 10, 7, 12]);
});
});
});
});