Simplifying clear/append detection
This commit is contained in:
@@ -130,10 +130,7 @@ ol.control.Select.prototype.deactivate = function() {
|
|||||||
* @param {ol.MapBrowserEvent} evt Event.
|
* @param {ol.MapBrowserEvent} evt Event.
|
||||||
*/
|
*/
|
||||||
ol.control.Select.prototype.handleClick = function(evt) {
|
ol.control.Select.prototype.handleClick = function(evt) {
|
||||||
var clear = true;
|
var clear = !ol.interaction.condition.shiftKeyOnly(evt.browserEvent);
|
||||||
if (ol.interaction.condition.shiftKeyOnly(evt.browserEvent)) {
|
|
||||||
clear = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function select(featuresByLayer) {
|
function select(featuresByLayer) {
|
||||||
this.select(featuresByLayer, clear);
|
this.select(featuresByLayer, clear);
|
||||||
|
|||||||
Reference in New Issue
Block a user