Only export handleEvent where it is used by other interactions

This commit is contained in:
Tim Schaub
2018-02-19 13:56:41 -07:00
parent bca8938a02
commit 1be61fdb09
11 changed files with 35 additions and 50 deletions

View File

@@ -27,11 +27,8 @@ const PointerInteraction = function(opt_options) {
const options = opt_options ? opt_options : {};
const handleEvent = options.handleEvent ?
options.handleEvent : PointerInteraction.handleEvent;
Interaction.call(this, {
handleEvent: handleEvent
handleEvent: options.handleEvent || handleEvent
});
/**
@@ -177,7 +174,7 @@ PointerInteraction.handleMoveEvent = nullFunction;
* @this {ol.interaction.Pointer}
* @api
*/
PointerInteraction.handleEvent = function(mapBrowserEvent) {
export function handleEvent(mapBrowserEvent) {
if (!(mapBrowserEvent instanceof MapBrowserPointerEvent)) {
return true;
}
@@ -201,7 +198,7 @@ PointerInteraction.handleEvent = function(mapBrowserEvent) {
}
}
return !stopEvent;
};
}
/**