In Openlayers 3 I've been unable to get my attempts at overriding the ol.interation.PinchZoom
's handleUpEvent
to work. I've tried a few different ways, but but below is a basic example of what I've tried.
This is an attempt to replace the standard PinchZoom
's handleUpEvent
with a custom one, and set this as the only interaction for the map. However, the event function is never called (never logs anything).
function handleUpEvent(evt) {
console.log("Up event handler");
return true; // Stop drag
}
map = new ol.Map({
layers: [],
target: 'map',
controls: controls,
interactions: [new ol.interaction.PinchZoom({handleEvent: handleUpEvent})],
view: new ol.View({projection: projCode})
});