Remove use of goog.object.getKeys

This commit is contained in:
Frederic Junod
2015-11-30 17:34:53 +01:00
parent 952a282756
commit cf1b1822b8
5 changed files with 7 additions and 5 deletions

View File

@@ -106,6 +106,8 @@ style of the existing OpenLayers 3 code, which includes:
* Use `array.length = 0` instead of `goog.array.clear`.
* Use `Object.keys(obj)` instead of `goog.object.getKeys(obj)`.
* Use bracket notation instead of `goog.object.set` and `goog.object.get` (with
two arguments).

View File

@@ -51,7 +51,7 @@ ol.pointer.MouseSource = function(dispatcher) {
/**
* @const
* @type {Object.<string, goog.events.BrowserEvent|Object>}
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
*/
this.pointerMap = dispatcher.pointerMap;

View File

@@ -54,7 +54,7 @@ ol.pointer.MsSource = function(dispatcher) {
/**
* @const
* @type {Object.<string, goog.events.BrowserEvent|Object>}
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
*/
this.pointerMap = dispatcher.pointerMap;

View File

@@ -61,7 +61,7 @@ ol.pointer.PointerEventHandler = function(element) {
/**
* @const
* @type {Object.<string, goog.events.BrowserEvent|Object>}
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
*/
this.pointerMap = {};

View File

@@ -55,7 +55,7 @@ ol.pointer.TouchSource = function(dispatcher, mouseSource) {
/**
* @const
* @type {Object.<string, goog.events.BrowserEvent|Object>}
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
*/
this.pointerMap = dispatcher.pointerMap;
@@ -269,7 +269,7 @@ ol.pointer.TouchSource.prototype.vacuumTouches_ = function(inEvent) {
var touchList = inEvent.getBrowserEvent().touches;
// pointerMap.getCount() should be < touchList.length here,
// as the touchstart has not been processed yet.
var keys = goog.object.getKeys(this.pointerMap);
var keys = Object.keys(this.pointerMap);
var count = keys.length;
if (count >= touchList.length) {
var d = [];