PointerInteraction uses MapBrowserPointerEvent not MapBrowserEvent
This commit is contained in:
@@ -109,19 +109,15 @@ goog.inherits(ol.interaction.DragBox, ol.interaction.PointerInteraction);
|
||||
|
||||
/**
|
||||
* Returns true if the pointer event is generated by a mouse pointer.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent
|
||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent
|
||||
* @return {boolean}
|
||||
*/
|
||||
ol.interaction.DragBox.prototype.isMousePointer =
|
||||
function(mapBrowserEvent) {
|
||||
goog.asserts.assertInstanceof(mapBrowserEvent, ol.MapBrowserPointerEvent);
|
||||
var mapBrowserPointerEvent =
|
||||
/** @type {ol.MapBrowserPointerEvent} */ (mapBrowserEvent);
|
||||
|
||||
/* pointerId must be 1 for mouse devices,
|
||||
* see: http://www.w3.org/Submission/pointer-events/#pointerevent-interface
|
||||
*/
|
||||
return mapBrowserPointerEvent.pointerEvent.pointerId == 1;
|
||||
return mapBrowserEvent.pointerEvent.pointerId == 1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user