Remove use of goog.object.containsKey

This commit is contained in:
Frederic Junod
2015-11-24 10:12:13 +01:00
parent 90e224bd96
commit 8d72589743
6 changed files with 13 additions and 17 deletions
+2 -3
View File
@@ -1,7 +1,6 @@
goog.provide('ol.geom.flat.geodesic');
goog.require('goog.asserts');
goog.require('goog.object');
goog.require('ol.TransformFunction');
goog.require('ol.math');
goog.require('ol.proj');
@@ -49,7 +48,7 @@ ol.geom.flat.geodesic.line_ =
a = stack.pop();
// Add the a coordinate if it has not been added yet
key = fracA.toString();
if (!goog.object.containsKey(fractions, key)) {
if (!(key in fractions)) {
flatCoordinates.push(a[0], a[1]);
fractions[key] = true;
}
@@ -68,7 +67,7 @@ ol.geom.flat.geodesic.line_ =
// segment.
flatCoordinates.push(b[0], b[1]);
key = fracB.toString();
goog.asserts.assert(!goog.object.containsKey(fractions, key),
goog.asserts.assert(!(key in fractions),
'fractions object should contain key : ' + key);
fractions[key] = true;
} else {