Pass the mapping object to the ol.pointer.EventSource constructor
Conflicts: src/ol/pointer/mssource.js
This commit is contained in:
committed by
tsauerwein
parent
4468d96a13
commit
028a183d11
@@ -30,7 +30,6 @@
|
||||
|
||||
goog.provide('ol.pointer.MouseSource');
|
||||
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.pointer.EventSource');
|
||||
|
||||
|
||||
@@ -41,26 +40,20 @@ goog.require('ol.pointer.EventSource');
|
||||
* @extends {ol.pointer.EventSource}
|
||||
*/
|
||||
ol.pointer.MouseSource = function(dispatcher) {
|
||||
goog.base(this, dispatcher);
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {goog.structs.Map}
|
||||
*/
|
||||
this.pointerMap = dispatcher.pointerMap;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @const
|
||||
* @type {Object.<string, function(goog.events.BrowserEvent)>}
|
||||
*/
|
||||
this.mapping_ = {
|
||||
var mapping = {
|
||||
'mousedown': this.mousedown,
|
||||
'mousemove': this.mousemove,
|
||||
'mouseup': this.mouseup,
|
||||
'mouseover': this.mouseover,
|
||||
'mouseout': this.mouseout
|
||||
};
|
||||
goog.base(this, dispatcher, mapping);
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {goog.structs.Map}
|
||||
*/
|
||||
this.pointerMap = dispatcher.pointerMap;
|
||||
|
||||
/**
|
||||
* @const
|
||||
@@ -94,18 +87,6 @@ ol.pointer.MouseSource.POINTER_TYPE = 'mouse';
|
||||
ol.pointer.MouseSource.DEDUP_DIST = 25;
|
||||
|
||||
|
||||
/** @inheritDoc */
|
||||
ol.pointer.MouseSource.prototype.getEvents = function() {
|
||||
return goog.object.getKeys(this.mapping_);
|
||||
};
|
||||
|
||||
|
||||
/** @inheritDoc */
|
||||
ol.pointer.MouseSource.prototype.getMapping = function() {
|
||||
return this.mapping_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Detect if a mouse event was simulated from a touch by
|
||||
* checking if previously there was a touch event at the
|
||||
|
||||
Reference in New Issue
Block a user