Import events conditions explicitly

This commit is contained in:
Marc Jansen
2018-02-05 18:22:42 +01:00
parent 1c8e60487c
commit 6e764a20b3
16 changed files with 54 additions and 69 deletions
+5 -6
View File
@@ -4,7 +4,7 @@
import {inherits} from '../index.js';
import RotationConstraint from '../RotationConstraint.js';
import ViewHint from '../ViewHint.js';
import _ol_events_condition_ from '../events/condition.js';
import {shiftKeyOnly, mouseOnly} from '../events/condition.js';
import Interaction from '../interaction/Interaction.js';
import PointerInteraction from '../interaction/Pointer.js';
@@ -37,8 +37,7 @@ const DragRotateAndZoom = function(opt_options) {
* @private
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : _ol_events_condition_.shiftKeyOnly;
this.condition_ = options.condition ? options.condition : shiftKeyOnly;
/**
* @private
@@ -75,7 +74,7 @@ inherits(DragRotateAndZoom, PointerInteraction);
* @private
*/
DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
if (!mouseOnly(mapBrowserEvent)) {
return;
}
@@ -111,7 +110,7 @@ DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
* @private
*/
DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
if (!mouseOnly(mapBrowserEvent)) {
return true;
}
@@ -134,7 +133,7 @@ DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
* @private
*/
DragRotateAndZoom.handleDownEvent_ = function(mapBrowserEvent) {
if (!_ol_events_condition_.mouseOnly(mapBrowserEvent)) {
if (!mouseOnly(mapBrowserEvent)) {
return false;
}