Simplifying clear/append detection

This commit is contained in:
ahocevar
2013-08-11 10:28:10 +02:00
parent b06526781c
commit 3d22ec4ca8

View File

@@ -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);