From b001a4856789b32c7fd41647e829f8c97ef7022a Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 1 Aug 2015 21:12:59 +0200 Subject: [PATCH] interaction/modify: Simplify lastNewVertexPixel condition --- src/ol/interaction/modifyinteraction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/interaction/modifyinteraction.js b/src/ol/interaction/modifyinteraction.js index e206af9053..cc1797db20 100644 --- a/src/ol/interaction/modifyinteraction.js +++ b/src/ol/interaction/modifyinteraction.js @@ -626,8 +626,8 @@ ol.interaction.Modify.handleEvent = function(mapBrowserEvent) { } if (!goog.isNull(this.vertexFeature_) && this.deleteCondition_(mapBrowserEvent)) { - if (!(this.lastNewVertexPixel_[0] === this.lastPixel_[0] && - this.lastNewVertexPixel_[1] === this.lastPixel_[1])) { + if (this.lastNewVertexPixel_[0] !== this.lastPixel_[0] || + this.lastNewVertexPixel_[1] !== this.lastPixel_[1]) { var geometry = this.vertexFeature_.getGeometry(); goog.asserts.assertInstanceof(geometry, ol.geom.Point, 'geometry should be an ol.geom.Point');