Accept flat coordinates in Circle constructor

This commit is contained in:
ahocevar
2018-07-07 18:02:38 +02:00
parent ce97cee6a6
commit e2f8d96763
2 changed files with 28 additions and 45 deletions

View File

@@ -173,18 +173,11 @@ describe('ol.geom.Circle', function() {
describe('#setFlatCoordinates', function() {
it('sets both center and radius', function() {
circle.setFlatCoordinates('XY', [1, 2, 4, 2]);
circle.setFlatCoordinatesInternal('XY', [1, 2, 4, 2]);
expect(circle.getCenter()).to.eql([1, 2]);
expect(circle.getRadius()).to.be(3);
});
it('fires a single change event', function() {
const spy = sinon.spy();
circle.on('change', spy);
circle.setFlatCoordinates('XY', [1, 2, 4, 2]);
expect(spy.calledOnce).to.be(true);
});
});
describe('#setRadius', function() {