Toward natural JavaScript syntax

This commit is contained in:
Tim Schaub
2015-09-25 12:16:42 -06:00
parent d610b206f7
commit 0927c55b3c
40 changed files with 146 additions and 188 deletions

View File

@@ -140,7 +140,7 @@ ol.renderer.Map.prototype.forEachFeatureAtCoordinate =
* @return {?} Callback result.
*/
function forEachFeatureAtCoordinate(feature) {
goog.asserts.assert(ol.isDef(feature), 'received a feature');
goog.asserts.assert(feature !== undefined, 'received a feature');
var key = goog.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;
@@ -242,7 +242,7 @@ ol.renderer.Map.prototype.hasFeatureAtCoordinate =
var hasFeature = this.forEachFeatureAtCoordinate(
coordinate, frameState, goog.functions.TRUE, this, layerFilter, thisArg);
return ol.isDef(hasFeature);
return hasFeature !== undefined;
};