update source and fire event only if features added

This commit is contained in:
mike-000
2020-07-20 16:08:00 +01:00
committed by GitHub
parent c2376455ad
commit 1812ce8b28
+3 -3
View File
@@ -147,9 +147,6 @@ class DragAndDrop extends Interaction {
featureProjection: projection, featureProjection: projection,
}); });
if (features && features.length > 0) { if (features && features.length > 0) {
break;
}
}
if (this.source_) { if (this.source_) {
this.source_.clear(); this.source_.clear();
this.source_.addFeatures(features); this.source_.addFeatures(features);
@@ -162,6 +159,9 @@ class DragAndDrop extends Interaction {
projection projection
) )
); );
break;
}
}
} }
/** /**