removes not needed WeakMap struct

This commit is contained in:
tsauerwein
2014-02-12 09:20:59 +01:00
parent a31cc3f18c
commit e1f4410ad4
2 changed files with 0 additions and 123 deletions

View File

@@ -43,7 +43,6 @@ goog.require('ol.pointer.MsSource');
goog.require('ol.pointer.NativeSource');
goog.require('ol.pointer.PointerEvent');
goog.require('ol.pointer.TouchSource');
goog.require('ol.structs.WeakMap');
@@ -69,18 +68,6 @@ ol.pointer.PointerEventHandler = function(element) {
this.pointerMap = new goog.structs.Map();
/**
* @const
* @type {ol.structs.WeakMap}
*/
this.targets = new ol.structs.WeakMap();
/**
* @const
* @type {ol.structs.WeakMap}
*/
this.handledEvents = new ol.structs.WeakMap();
this.eventMap = {};
// Scope objects for native events.
@@ -215,19 +202,11 @@ ol.pointer.PointerEventHandler.prototype.unregister_ = function() {
* @param {goog.events.BrowserEvent} inEvent Browser event.
*/
ol.pointer.PointerEventHandler.prototype.eventHandler_ = function(inEvent) {
// This is used to prevent multiple dispatch of pointerevents from
// platform events. This can happen when two elements in different scopes
// are set up to create pointer events, which is relevant to Shadow DOM.
if (this.handledEvents['get'](inEvent)) {
return;
}
var type = inEvent.type;
var handler = this.eventMap[type];
if (handler) {
handler(inEvent);
}
this.handledEvents['set'](inEvent, true);
};
@@ -503,7 +482,6 @@ ol.pointer.PointerEventHandler.prototype.makeEvent = function(inType, inEvent) {
if (inEvent.preventDefault) {
e.preventDefault = inEvent.preventDefault;
}
this.targets['set'](e, this.targets['get'](inEvent) || inEvent.target);
return e;
};