Make ol.Feature#setStyle accept null

This commit is contained in:
Éric Lemoine
2014-09-17 17:49:35 +02:00
parent dfb2734368
commit d335318496
2 changed files with 21 additions and 8 deletions

View File

@@ -320,6 +320,14 @@ describe('ol.Feature', function() {
expect(feature.getStyleFunction()).to.be(styleFunction);
});
it('accepts null', function() {
var feature = new ol.Feature();
feature.setStyle(style);
feature.setStyle(null);
expect(feature.getStyle()).to.be(null);
expect(feature.getStyleFunction()).to.be(undefined);
});
it('dispatches a change event', function(done) {
var feature = new ol.Feature();
feature.on('change', function() {