Skip to content

Commit 7600f8d

Browse files
committed
Make bbox creation simpler
1 parent 9010e24 commit 7600f8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/maps/MapAreaSelect.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import GeoJsonMixin from './ExtentMixin.vue';
1111
import GeocoderMixin from './GeocoderMixin.vue';
1212
import MapMixin from './MapMixin.vue';
1313
import Utils from '../../utils.js';
14+
import {shiftKeyOnly} from 'ol/events/condition.js';
1415
import ExtentInteraction from 'ol/interaction/Extent';
1516
import { transformExtent } from 'ol/proj';
1617
import { containsXY } from 'ol/extent';
@@ -157,14 +158,13 @@ export default {
157158
else if (this.interaction.handlingDownUpSequence || this.interaction.snapToVertex_(event.pixel, event.map)) {
158159
return true;
159160
}
160-
return false;
161+
return shiftKeyOnly(event);
161162
};
162163
163164
this.interaction = new ExtentInteraction({
164165
extent: this.projectedExtent,
165166
condition,
166-
boxStyle: createDefaultStyle(),
167-
pixelTolerance: 15
167+
boxStyle: createDefaultStyle()
168168
});
169169
170170
if (this.editable) {

0 commit comments

Comments
 (0)