Make ol/interaction/Select#handleEvent return always true.

Previously it was returning true only if the event was a pointerMove
which prevented multiple Select objects with other event types from
working.
This commit is contained in:
TigerShark
2019-10-23 17:30:56 -03:00
parent ebae0386bd
commit e60dc93e0e
3 changed files with 6 additions and 17 deletions

View File

@@ -110,19 +110,6 @@ export const mouseActionButton = function(mapBrowserEvent) {
export const never = FALSE;
/**
* Return `true` if the browser event is a `pointermove` event, `false`
* otherwise.
*
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} True if the browser event is a `pointermove` event.
* @api
*/
export const pointerMove = function(mapBrowserEvent) {
return mapBrowserEvent.type == 'pointermove';
};
/**
* Return `true` if the event is a map `singleclick` event, `false` otherwise.
*

View File

@@ -5,7 +5,7 @@ import {getUid} from '../util.js';
import CollectionEventType from '../CollectionEventType.js';
import {extend, includes} from '../array.js';
import Event from '../events/Event.js';
import {singleClick, never, shiftKeyOnly, pointerMove} from '../events/condition.js';
import {singleClick, never, shiftKeyOnly} from '../events/condition.js';
import {TRUE} from '../functions.js';
import GeometryType from '../geom/GeometryType.js';
import Interaction from './Interaction.js';
@@ -468,7 +468,7 @@ function handleEvent(mapBrowserEvent) {
new SelectEvent(SelectEventType.SELECT,
selected, deselected, mapBrowserEvent));
}
return pointerMove(mapBrowserEvent);
return true;
}