Merge pull request #3509 from pgiraud/geometry_changed_null

Dispatch change event even when geometry is set to null
This commit is contained in:
Pierre GIRAUD
2015-04-07 12:39:48 +02:00
2 changed files with 14 additions and 1 deletions

View File

@@ -416,6 +416,19 @@ describe('ol.Feature', function() {
});
});
describe('#setGeometry()', function() {
it('dispatches a change event when geometry is set to null',
function() {
var feature = new ol.Feature({
geometry: new ol.geom.Point([0, 0])
});
var spy = sinon.spy();
feature.on('change', spy);
feature.setGeometry(null);
expect(spy.callCount).to.be(1);
});
});
});