Use Ctrl key / Meta key to activate the selection drag box

This commit is contained in:
Frederic Junod
2015-10-15 13:49:37 +02:00
parent c27bcd86d3
commit a04022e8df
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ shortdesc: Using a DragBox interaction to select features.
docs: >
<p>This example shows how to use a <code>DragBox</code> interaction to select features. Selected features are added
to the feature overlay of a select interaction (<code>ol.interaction.Select</code>) for highlighting.</p>
<p>Use <code>SHIFT+drag</code> to draw boxes.</p>
<p>Use <code>Ctrl+drag</code> (<code>Meta+drag</code> on Mac) to draw boxes.</p>
tags: "DragBox, feature, selection, box"
---
<div class="row-fluid">

View File

@@ -44,7 +44,7 @@ var selectedFeatures = select.getFeatures();
// a DragBox interaction used to select features by drawing boxes
var dragBox = new ol.interaction.DragBox({
condition: ol.events.condition.shiftKeyOnly,
condition: ol.events.condition.platformModifierKeyOnly,
style: new ol.style.Style({
fill: new ol.style.Fill({
color: [255, 255, 255, 0.4]