From 109e6a832499278527df03b504866926b59c00ce Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Wed, 7 Dec 2016 11:15:23 +0100 Subject: [PATCH] Make modify interaction more robust When the map has not been rendered yet, adding a feature should not trigger coordinate related functions as they make use of the framestate. --- src/ol/interaction/modify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/interaction/modify.js b/src/ol/interaction/modify.js index ddeb623c5a..3c0e97eb57 100644 --- a/src/ol/interaction/modify.js +++ b/src/ol/interaction/modify.js @@ -198,7 +198,7 @@ ol.interaction.Modify.prototype.addFeature_ = function(feature) { this.SEGMENT_WRITERS_[geometry.getType()].call(this, feature, geometry); } var map = this.getMap(); - if (map) { + if (map && map.isRendered()) { this.handlePointerAtPixel_(this.lastPixel_, map); } ol.events.listen(feature, ol.events.EventType.CHANGE,