From cf8738f9f6bb050c38c64a7d4e6ff94e6614b2de Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 30 Sep 2014 09:02:53 +0200 Subject: [PATCH] Rename updatefeature event to changefeature --- src/ol/source/vectorsource.js | 6 +++--- test/spec/ol/source/vectorsource.test.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index 98c19d7921..9e036b52cf 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -31,10 +31,10 @@ ol.source.VectorEventType = { /** * Triggered when a feature is updated. - * @event ol.source.VectorEvent#updatefeature + * @event ol.source.VectorEvent#changefeature * @api */ - UPDATEFEATURE: 'updatefeature', + CHANGEFEATURE: 'changefeature', /** * Triggered when a feature is removed from the source. @@ -446,7 +446,7 @@ ol.source.Vector.prototype.handleFeatureChange_ = function(event) { } this.changed(); this.dispatchEvent(new ol.source.VectorEvent( - ol.source.VectorEventType.UPDATEFEATURE, feature)); + ol.source.VectorEventType.CHANGEFEATURE, feature)); }; diff --git a/test/spec/ol/source/vectorsource.test.js b/test/spec/ol/source/vectorsource.test.js index 19cd832b7a..1ec5803a2c 100644 --- a/test/spec/ol/source/vectorsource.test.js +++ b/test/spec/ol/source/vectorsource.test.js @@ -242,13 +242,13 @@ describe('ol.source.Vector', function() { expect(listener).to.be.called(); }); - it('fires a updatefeature event when updating a feature', function() { + it('fires a changefeature event when updating a feature', function() { var feature = new ol.Feature(new ol.geom.Point([1, 1])); vectorSource.addFeature(feature); var listener = sinon.spy(function(event) { expect(event.feature).to.be(feature); }); - vectorSource.on('updatefeature', listener); + vectorSource.on('changefeature', listener); feature.setStyle(null); expect(listener).to.be.called(); });