Use Ctrl key / Meta key to activate the selection drag box
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user