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.MsSource');
|
||||
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.pointer.EventSource');
|
||||
|
||||
|
||||
@@ -41,20 +40,7 @@ goog.require('ol.pointer.EventSource');
|
||||
* @extends {ol.pointer.EventSource}
|
||||
*/
|
||||
ol.pointer.MsSource = 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 = {
|
||||
'MSPointerDown': this.msPointerDown,
|
||||
'MSPointerMove': this.msPointerMove,
|
||||
'MSPointerUp': this.msPointerUp,
|
||||
@@ -64,6 +50,13 @@ ol.pointer.MsSource = function(dispatcher) {
|
||||
'MSGotPointerCapture': this.msGotPointerCapture,
|
||||
'MSLostPointerCapture': this.msLostPointerCapture
|
||||
};
|
||||
goog.base(this, dispatcher, mapping);
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {goog.structs.Map}
|
||||
*/
|
||||
this.pointerMap = dispatcher.pointerMap;
|
||||
|
||||
/**
|
||||
* @const
|
||||
@@ -80,18 +73,6 @@ ol.pointer.MsSource = function(dispatcher) {
|
||||
goog.inherits(ol.pointer.MsSource, ol.pointer.EventSource);
|
||||
|
||||
|
||||
/** @inheritDoc */
|
||||
ol.pointer.MsSource.prototype.getEvents = function() {
|
||||
return goog.object.getKeys(this.mapping_);
|
||||
};
|
||||
|
||||
|
||||
/** @inheritDoc */
|
||||
ol.pointer.MsSource.prototype.getMapping = function() {
|
||||
return this.mapping_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Creates a copy of the original event that will be used
|
||||
* for the fake pointer event.
|
||||
|
||||
Reference in New Issue
Block a user