Fix initial state of the Modify interaction

Features that are in the features collection need to be added to the R-Tree.
This commit is contained in:
Éric Lemoine
2014-03-28 16:03:34 +01:00
parent 8545aa83a9
commit c33a3372d9

View File

@@ -110,6 +110,7 @@ ol.interaction.Modify = function(options) {
*/
this.features_ = options.features;
this.features_.forEach(this.addFeature_, this);
goog.events.listen(this.features_, ol.CollectionEventType.ADD,
this.addFeature_, false, this);
goog.events.listen(this.features_, ol.CollectionEventType.REMOVE,