Merge pull request #4176 from tschaub/remove-isdefandnotnull

Remove use of goog.isDefAndNotNull().
This commit is contained in:
Tim Schaub
2015-10-01 00:05:57 -06:00
45 changed files with 116 additions and 135 deletions

View File

@@ -479,7 +479,7 @@ ol.render.canvas.Immediate.prototype.drawCircleGeometry =
*/
ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
var geometry = style.getGeometryFunction()(feature);
if (!goog.isDefAndNotNull(geometry) ||
if (!geometry ||
!ol.extent.intersects(this.extent_, geometry.getExtent())) {
return;
}
@@ -873,7 +873,7 @@ ol.render.canvas.Immediate.prototype.setFillStrokeStyle =
this.strokeState_ = {
lineCap: strokeStyleLineCap !== undefined ?
strokeStyleLineCap : ol.render.canvas.defaultLineCap,
lineDash: goog.isDefAndNotNull(strokeStyleLineDash) ?
lineDash: strokeStyleLineDash ?
strokeStyleLineDash : ol.render.canvas.defaultLineDash,
lineJoin: strokeStyleLineJoin !== undefined ?
strokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
@@ -962,7 +962,7 @@ ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
this.textStrokeState_ = {
lineCap: textStrokeStyleLineCap !== undefined ?
textStrokeStyleLineCap : ol.render.canvas.defaultLineCap,
lineDash: goog.isDefAndNotNull(textStrokeStyleLineDash) ?
lineDash: textStrokeStyleLineDash ?
textStrokeStyleLineDash : ol.render.canvas.defaultLineDash,
lineJoin: textStrokeStyleLineJoin !== undefined ?
textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin,