Merge pull request #4159 from fredj/rm-goog.object.containsKey
Remove use of goog.object.containsKey
This commit is contained in:
@@ -3,7 +3,6 @@ goog.provide('ol.format.GPX');
|
|||||||
goog.require('goog.array');
|
goog.require('goog.array');
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
goog.require('goog.dom.NodeType');
|
goog.require('goog.dom.NodeType');
|
||||||
goog.require('goog.object');
|
|
||||||
goog.require('ol.Feature');
|
goog.require('ol.Feature');
|
||||||
goog.require('ol.format.Feature');
|
goog.require('ol.format.Feature');
|
||||||
goog.require('ol.format.XMLFeature');
|
goog.require('ol.format.XMLFeature');
|
||||||
@@ -71,16 +70,14 @@ ol.format.GPX.appendCoordinate_ = function(flatCoordinates, node, values) {
|
|||||||
flatCoordinates.push(
|
flatCoordinates.push(
|
||||||
parseFloat(node.getAttribute('lon')),
|
parseFloat(node.getAttribute('lon')),
|
||||||
parseFloat(node.getAttribute('lat')));
|
parseFloat(node.getAttribute('lat')));
|
||||||
if (goog.object.containsKey(values, 'ele')) {
|
if ('ele' in values) {
|
||||||
flatCoordinates.push(
|
flatCoordinates.push(/** @type {number} */ (values['ele']));
|
||||||
/** @type {number} */ (values['ele']));
|
|
||||||
delete values['ele'];
|
delete values['ele'];
|
||||||
} else {
|
} else {
|
||||||
flatCoordinates.push(0);
|
flatCoordinates.push(0);
|
||||||
}
|
}
|
||||||
if (goog.object.containsKey(values, 'time')) {
|
if ('time' in values) {
|
||||||
flatCoordinates.push(
|
flatCoordinates.push(/** @type {number} */ (values['time']));
|
||||||
/** @type {number} */ (values['time']));
|
|
||||||
delete values['time'];
|
delete values['time'];
|
||||||
} else {
|
} else {
|
||||||
flatCoordinates.push(0);
|
flatCoordinates.push(0);
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
goog.provide('ol.pointer.MouseSource');
|
goog.provide('ol.pointer.MouseSource');
|
||||||
|
|
||||||
goog.require('goog.object');
|
|
||||||
goog.require('ol.pointer.EventSource');
|
goog.require('ol.pointer.EventSource');
|
||||||
|
|
||||||
|
|
||||||
@@ -161,11 +160,9 @@ ol.pointer.MouseSource.prepareEvent = function(inEvent, dispatcher) {
|
|||||||
*/
|
*/
|
||||||
ol.pointer.MouseSource.prototype.mousedown = function(inEvent) {
|
ol.pointer.MouseSource.prototype.mousedown = function(inEvent) {
|
||||||
if (!this.isEventSimulatedFromTouch_(inEvent)) {
|
if (!this.isEventSimulatedFromTouch_(inEvent)) {
|
||||||
var p = goog.object.containsKey(this.pointerMap,
|
|
||||||
ol.pointer.MouseSource.POINTER_ID.toString());
|
|
||||||
// TODO(dfreedman) workaround for some elements not sending mouseup
|
// TODO(dfreedman) workaround for some elements not sending mouseup
|
||||||
// http://crbug/149091
|
// http://crbug/149091
|
||||||
if (p) {
|
if (ol.pointer.MouseSource.POINTER_ID.toString() in this.pointerMap) {
|
||||||
this.cancel(inEvent);
|
this.cancel(inEvent);
|
||||||
}
|
}
|
||||||
var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
|
var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
|
||||||
|
|||||||
Reference in New Issue
Block a user