Remove use of goog.object.getKeys
This commit is contained in:
@@ -106,6 +106,8 @@ style of the existing OpenLayers 3 code, which includes:
|
|||||||
|
|
||||||
* Use `array.length = 0` instead of `goog.array.clear`.
|
* 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
|
* Use bracket notation instead of `goog.object.set` and `goog.object.get` (with
|
||||||
two arguments).
|
two arguments).
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ ol.pointer.MouseSource = function(dispatcher) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
* @type {Object.<string, goog.events.BrowserEvent|Object>}
|
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
|
||||||
*/
|
*/
|
||||||
this.pointerMap = dispatcher.pointerMap;
|
this.pointerMap = dispatcher.pointerMap;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ ol.pointer.MsSource = function(dispatcher) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
* @type {Object.<string, goog.events.BrowserEvent|Object>}
|
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
|
||||||
*/
|
*/
|
||||||
this.pointerMap = dispatcher.pointerMap;
|
this.pointerMap = dispatcher.pointerMap;
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ ol.pointer.PointerEventHandler = function(element) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
* @type {Object.<string, goog.events.BrowserEvent|Object>}
|
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
|
||||||
*/
|
*/
|
||||||
this.pointerMap = {};
|
this.pointerMap = {};
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ ol.pointer.TouchSource = function(dispatcher, mouseSource) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
* @type {Object.<string, goog.events.BrowserEvent|Object>}
|
* @type {!Object.<string, goog.events.BrowserEvent|Object>}
|
||||||
*/
|
*/
|
||||||
this.pointerMap = dispatcher.pointerMap;
|
this.pointerMap = dispatcher.pointerMap;
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ ol.pointer.TouchSource.prototype.vacuumTouches_ = function(inEvent) {
|
|||||||
var touchList = inEvent.getBrowserEvent().touches;
|
var touchList = inEvent.getBrowserEvent().touches;
|
||||||
// pointerMap.getCount() should be < touchList.length here,
|
// pointerMap.getCount() should be < touchList.length here,
|
||||||
// as the touchstart has not been processed yet.
|
// 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;
|
var count = keys.length;
|
||||||
if (count >= touchList.length) {
|
if (count >= touchList.length) {
|
||||||
var d = [];
|
var d = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user