From 3d22ec4ca8de639ff0e4dacb589fdf26a7bb2fc5 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 11 Aug 2013 10:28:10 +0200 Subject: [PATCH] Simplifying clear/append detection --- src/ol/control/selectcontrol.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ol/control/selectcontrol.js b/src/ol/control/selectcontrol.js index b314ab313d..f6a1aeefba 100644 --- a/src/ol/control/selectcontrol.js +++ b/src/ol/control/selectcontrol.js @@ -130,10 +130,7 @@ ol.control.Select.prototype.deactivate = function() { * @param {ol.MapBrowserEvent} evt Event. */ ol.control.Select.prototype.handleClick = function(evt) { - var clear = true; - if (ol.interaction.condition.shiftKeyOnly(evt.browserEvent)) { - clear = false; - } + var clear = !ol.interaction.condition.shiftKeyOnly(evt.browserEvent); function select(featuresByLayer) { this.select(featuresByLayer, clear);