From 3fbbdb78d5eb62be5b701b22ab5b35a56dc85421 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 19 Nov 2013 09:52:27 -0700 Subject: [PATCH] Call getElement to get layer --- src/ol/interaction/modifyinteraction.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ol/interaction/modifyinteraction.js b/src/ol/interaction/modifyinteraction.js index 4d0ed9da84..8badb14eda 100644 --- a/src/ol/interaction/modifyinteraction.js +++ b/src/ol/interaction/modifyinteraction.js @@ -156,8 +156,9 @@ ol.interaction.Modify.prototype.setMap = function(map) { * @private */ ol.interaction.Modify.prototype.handleLayerAdded_ = function(evt) { - goog.asserts.assertInstanceof(evt.getElement, ol.layer.Layer); - this.addLayer_(evt.getElement); + var layer = evt.getElement(); + goog.asserts.assertInstanceof(layer, ol.layer.Layer); + this.addLayer_(layer); }; @@ -182,8 +183,9 @@ ol.interaction.Modify.prototype.addLayer_ = function(layer) { * @private */ ol.interaction.Modify.prototype.handleLayerRemoved_ = function(evt) { - goog.asserts.assertInstanceof(evt.getElement, ol.layer.Layer); - this.removeLayer_(evt.getElement()); + var layer = evt.getElement(); + goog.asserts.assertInstanceof(layer, ol.layer.Layer); + this.removeLayer_(layer); };