Set ol.pointer.*Source#mapping_ properties to private

This commit is contained in:
Frederic Junod
2014-03-10 11:26:28 +01:00
committed by tsauerwein
parent a916e2500b
commit b2e946794f
4 changed files with 16 additions and 12 deletions
+4 -3
View File
@@ -50,10 +50,11 @@ ol.pointer.MouseSource = function(dispatcher) {
this.pointerMap = dispatcher.pointerMap; this.pointerMap = dispatcher.pointerMap;
/** /**
* @private
* @const * @const
* @type {Object.<string, function(goog.events.BrowserEvent)>} * @type {Object.<string, function(goog.events.BrowserEvent)>}
*/ */
this.mapping = { this.mapping_ = {
'mousedown': this.mousedown, 'mousedown': this.mousedown,
'mousemove': this.mousemove, 'mousemove': this.mousemove,
'mouseup': this.mouseup, 'mouseup': this.mouseup,
@@ -95,13 +96,13 @@ ol.pointer.MouseSource.DEDUP_DIST = 25;
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.MouseSource.prototype.getEvents = function() { ol.pointer.MouseSource.prototype.getEvents = function() {
return goog.object.getKeys(this.mapping); return goog.object.getKeys(this.mapping_);
}; };
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.MouseSource.prototype.getMapping = function() { ol.pointer.MouseSource.prototype.getMapping = function() {
return this.mapping; return this.mapping_;
}; };
+4 -3
View File
@@ -56,10 +56,11 @@ ol.pointer.MsSource = function(dispatcher) {
this.HAS_BITMAP_TYPE = this.hasBitmapType(); this.HAS_BITMAP_TYPE = this.hasBitmapType();
/** /**
* @private
* @const * @const
* @type {Object.<string, function(goog.events.BrowserEvent)>} * @type {Object.<string, function(goog.events.BrowserEvent)>}
*/ */
this.mapping = { this.mapping_ = {
'MSPointerDown': this.msPointerDown, 'MSPointerDown': this.msPointerDown,
'MSPointerMove': this.msPointerMove, 'MSPointerMove': this.msPointerMove,
'MSPointerUp': this.msPointerUp, 'MSPointerUp': this.msPointerUp,
@@ -87,13 +88,13 @@ goog.inherits(ol.pointer.MsSource, ol.pointer.EventSource);
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.MsSource.prototype.getEvents = function() { ol.pointer.MsSource.prototype.getEvents = function() {
return goog.object.getKeys(this.mapping); return goog.object.getKeys(this.mapping_);
}; };
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.MsSource.prototype.getMapping = function() { ol.pointer.MsSource.prototype.getMapping = function() {
return this.mapping; return this.mapping_;
}; };
+4 -3
View File
@@ -50,10 +50,11 @@ ol.pointer.NativeSource = function(dispatcher) {
this.pointerMap = dispatcher.pointerMap; this.pointerMap = dispatcher.pointerMap;
/** /**
* @private
* @const * @const
* @type {Object.<string, function(goog.events.BrowserEvent)>} * @type {Object.<string, function(goog.events.BrowserEvent)>}
*/ */
this.mapping = { this.mapping_ = {
'pointerdown': this.pointerDown, 'pointerdown': this.pointerDown,
'pointermove': this.pointerMove, 'pointermove': this.pointerMove,
'pointerup': this.pointerUp, 'pointerup': this.pointerUp,
@@ -69,13 +70,13 @@ goog.inherits(ol.pointer.NativeSource, ol.pointer.EventSource);
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.NativeSource.prototype.getEvents = function() { ol.pointer.NativeSource.prototype.getEvents = function() {
return goog.object.getKeys(this.mapping); return goog.object.getKeys(this.mapping_);
}; };
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.NativeSource.prototype.getMapping = function() { ol.pointer.NativeSource.prototype.getMapping = function() {
return this.mapping; return this.mapping_;
}; };
+4 -3
View File
@@ -91,10 +91,11 @@ ol.pointer.TouchSource = function(dispatcher, mouseSource) {
this.resetId_ = null; this.resetId_ = null;
/** /**
* @private
* @const * @const
* @type {Object.<string, function(goog.events.BrowserEvent)>} * @type {Object.<string, function(goog.events.BrowserEvent)>}
*/ */
this.mapping = { this.mapping_ = {
'touchstart': this.touchstart, 'touchstart': this.touchstart,
'touchmove': this.touchmove, 'touchmove': this.touchmove,
'touchend': this.touchend, 'touchend': this.touchend,
@@ -113,13 +114,13 @@ ol.pointer.TouchSource.POINTER_TYPE = 'touch';
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.TouchSource.prototype.getEvents = function() { ol.pointer.TouchSource.prototype.getEvents = function() {
return goog.object.getKeys(this.mapping); return goog.object.getKeys(this.mapping_);
}; };
/** @inheritDoc */ /** @inheritDoc */
ol.pointer.TouchSource.prototype.getMapping = function() { ol.pointer.TouchSource.prototype.getMapping = function() {
return this.mapping; return this.mapping_;
}; };