Remove use of goog.object.remove

This commit is contained in:
Frederic Junod
2015-09-22 12:03:52 +02:00
parent 9f57e57400
commit b128675e60
8 changed files with 14 additions and 16 deletions

View File

@@ -248,6 +248,5 @@ ol.pointer.MouseSource.prototype.cancel = function(inEvent) {
* Remove the mouse from the list of active pointers.
*/
ol.pointer.MouseSource.prototype.cleanupMouse = function() {
goog.object.remove(this.pointerMap,
ol.pointer.MouseSource.POINTER_ID.toString());
delete this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()];
};

View File

@@ -30,7 +30,6 @@
goog.provide('ol.pointer.MsSource');
goog.require('goog.object');
goog.require('ol.pointer.EventSource');
@@ -98,7 +97,7 @@ ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {
* @param {number} pointerId
*/
ol.pointer.MsSource.prototype.cleanup = function(pointerId) {
goog.object.remove(this.pointerMap, pointerId);
delete this.pointerMap[pointerId.toString()];
};
@@ -108,7 +107,7 @@ ol.pointer.MsSource.prototype.cleanup = function(pointerId) {
* @param {goog.events.BrowserEvent} inEvent
*/
ol.pointer.MsSource.prototype.msPointerDown = function(inEvent) {
this.pointerMap[inEvent.getBrowserEvent().pointerId] = inEvent;
this.pointerMap[inEvent.getBrowserEvent().pointerId.toString()] = inEvent;
var e = this.prepareEvent_(inEvent);
this.dispatcher.down(e, inEvent);
};

View File

@@ -425,7 +425,7 @@ ol.pointer.TouchSource.prototype.cancelOut_ =
* @param {Object} inPointer
*/
ol.pointer.TouchSource.prototype.cleanUpPointer_ = function(inPointer) {
goog.object.remove(this.pointerMap, inPointer.pointerId);
delete this.pointerMap[inPointer.pointerId];
this.removePrimaryPointer_(inPointer);
};