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

@@ -1,6 +1,6 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {click, pointerMove, altKeyOnly} from '../src/ol/events/condition.js';
import {click, altKeyOnly} from '../src/ol/events/condition.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Select from '../src/ol/interaction/Select.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
@@ -39,7 +39,9 @@ const selectClick = new Select({
// select interaction working on "pointermove"
const selectPointerMove = new Select({
condition: pointerMove
condition: function(mapBrowserEvent) {
return mapBrowserEvent.type == 'pointermove';
}
});
const selectAltClick = new Select({