Add handle*Event options to ol.interaction.Pointer
More specifically: handleDownEvent, handleDragEvent, handleMoveEvent, and handleUpEvent.
This commit is contained in:
@@ -31,7 +31,11 @@ ol.interaction.DragRotateAndZoom = function(opt_options) {
|
||||
|
||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||
|
||||
goog.base(this);
|
||||
goog.base(this, {
|
||||
handleDownEvent: ol.interaction.DragRotateAndZoom.handleDownEvent_,
|
||||
handleDragEvent: ol.interaction.DragRotateAndZoom.handleDragEvent_,
|
||||
handleUpEvent: ol.interaction.DragRotateAndZoom.handleUpEvent_
|
||||
});
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -64,10 +68,11 @@ goog.inherits(ol.interaction.DragRotateAndZoom,
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
||||
* @this {ol.interaction.DragRotateAndZoom}
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.DragRotateAndZoom.prototype.handlePointerDrag =
|
||||
function(mapBrowserEvent) {
|
||||
ol.interaction.DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
|
||||
return;
|
||||
}
|
||||
@@ -101,10 +106,12 @@ ol.interaction.DragRotateAndZoom.prototype.handlePointerDrag =
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
||||
* @return {boolean} Stop drag sequence?
|
||||
* @this {ol.interaction.DragRotateAndZoom}
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.DragRotateAndZoom.prototype.handlePointerUp =
|
||||
function(mapBrowserEvent) {
|
||||
ol.interaction.DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
|
||||
if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
|
||||
return true;
|
||||
}
|
||||
@@ -124,10 +131,12 @@ ol.interaction.DragRotateAndZoom.prototype.handlePointerUp =
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
||||
* @return {boolean} Start drag sequence?
|
||||
* @this {ol.interaction.DragRotateAndZoom}
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.DragRotateAndZoom.prototype.handlePointerDown =
|
||||
function(mapBrowserEvent) {
|
||||
ol.interaction.DragRotateAndZoom.handleDownEvent_ = function(mapBrowserEvent) {
|
||||
if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user