Inline goog.isDef() calls for properties

This commit is contained in:
Tim Schaub
2015-09-27 10:40:20 -06:00
parent 36e336f406
commit 83c59ee255
44 changed files with 200 additions and 198 deletions

View File

@@ -716,25 +716,25 @@ ol.render.canvas.ImageReplay.prototype.drawPointGeometry =
if (goog.isNull(this.image_)) {
return;
}
goog.asserts.assert(goog.isDef(this.anchorX_),
goog.asserts.assert(this.anchorX_ !== undefined,
'this.anchorX_ should be defined');
goog.asserts.assert(goog.isDef(this.anchorY_),
goog.asserts.assert(this.anchorY_ !== undefined,
'this.anchorY_ should be defined');
goog.asserts.assert(goog.isDef(this.height_),
goog.asserts.assert(this.height_ !== undefined,
'this.height_ should be defined');
goog.asserts.assert(goog.isDef(this.opacity_),
goog.asserts.assert(this.opacity_ !== undefined,
'this.opacity_ should be defined');
goog.asserts.assert(goog.isDef(this.originX_),
goog.asserts.assert(this.originX_ !== undefined,
'this.originX_ should be defined');
goog.asserts.assert(goog.isDef(this.originY_),
goog.asserts.assert(this.originY_ !== undefined,
'this.originY_ should be defined');
goog.asserts.assert(goog.isDef(this.rotateWithView_),
goog.asserts.assert(this.rotateWithView_ !== undefined,
'this.rotateWithView_ should be defined');
goog.asserts.assert(goog.isDef(this.rotation_),
goog.asserts.assert(this.rotation_ !== undefined,
'this.rotation_ should be defined');
goog.asserts.assert(goog.isDef(this.scale_),
goog.asserts.assert(this.scale_ !== undefined,
'this.scale_ should be defined');
goog.asserts.assert(goog.isDef(this.width_),
goog.asserts.assert(this.width_ !== undefined,
'this.width_ should be defined');
this.beginGeometry(pointGeometry, feature);
var flatCoordinates = pointGeometry.getFlatCoordinates();
@@ -769,25 +769,25 @@ ol.render.canvas.ImageReplay.prototype.drawMultiPointGeometry =
if (goog.isNull(this.image_)) {
return;
}
goog.asserts.assert(goog.isDef(this.anchorX_),
goog.asserts.assert(this.anchorX_ !== undefined,
'this.anchorX_ should be defined');
goog.asserts.assert(goog.isDef(this.anchorY_),
goog.asserts.assert(this.anchorY_ !== undefined,
'this.anchorY_ should be defined');
goog.asserts.assert(goog.isDef(this.height_),
goog.asserts.assert(this.height_ !== undefined,
'this.height_ should be defined');
goog.asserts.assert(goog.isDef(this.opacity_),
goog.asserts.assert(this.opacity_ !== undefined,
'this.opacity_ should be defined');
goog.asserts.assert(goog.isDef(this.originX_),
goog.asserts.assert(this.originX_ !== undefined,
'this.originX_ should be defined');
goog.asserts.assert(goog.isDef(this.originY_),
goog.asserts.assert(this.originY_ !== undefined,
'this.originY_ should be defined');
goog.asserts.assert(goog.isDef(this.rotateWithView_),
goog.asserts.assert(this.rotateWithView_ !== undefined,
'this.rotateWithView_ should be defined');
goog.asserts.assert(goog.isDef(this.rotation_),
goog.asserts.assert(this.rotation_ !== undefined,
'this.rotation_ should be defined');
goog.asserts.assert(goog.isDef(this.scale_),
goog.asserts.assert(this.scale_ !== undefined,
'this.scale_ should be defined');
goog.asserts.assert(goog.isDef(this.width_),
goog.asserts.assert(this.width_ !== undefined,
'this.width_ should be defined');
this.beginGeometry(multiPointGeometry, feature);
var flatCoordinates = multiPointGeometry.getFlatCoordinates();
@@ -1198,7 +1198,7 @@ ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ =
this.instructions.push(fillInstruction);
}
if (state.strokeStyle !== undefined) {
goog.asserts.assert(goog.isDef(state.lineWidth),
goog.asserts.assert(state.lineWidth !== undefined,
'state.lineWidth should be defined');
var strokeInstruction = [ol.render.canvas.Instruction.STROKE];
this.instructions.push(strokeInstruction);
@@ -1221,7 +1221,7 @@ ol.render.canvas.PolygonReplay.prototype.drawCircleGeometry =
return;
}
if (strokeStyle !== undefined) {
goog.asserts.assert(goog.isDef(state.lineWidth),
goog.asserts.assert(state.lineWidth !== undefined,
'state.lineWidth should be defined');
}
this.setFillStrokeStyles_();
@@ -1251,7 +1251,7 @@ ol.render.canvas.PolygonReplay.prototype.drawCircleGeometry =
this.instructions.push(fillInstruction);
}
if (state.strokeStyle !== undefined) {
goog.asserts.assert(goog.isDef(state.lineWidth),
goog.asserts.assert(state.lineWidth !== undefined,
'state.lineWidth should be defined');
var strokeInstruction = [ol.render.canvas.Instruction.STROKE];
this.instructions.push(strokeInstruction);
@@ -1274,7 +1274,7 @@ ol.render.canvas.PolygonReplay.prototype.drawPolygonGeometry =
return;
}
if (strokeStyle !== undefined) {
goog.asserts.assert(goog.isDef(state.lineWidth),
goog.asserts.assert(state.lineWidth !== undefined,
'state.lineWidth should be defined');
}
this.setFillStrokeStyles_();
@@ -1310,7 +1310,7 @@ ol.render.canvas.PolygonReplay.prototype.drawMultiPolygonGeometry =
return;
}
if (strokeStyle !== undefined) {
goog.asserts.assert(goog.isDef(state.lineWidth),
goog.asserts.assert(state.lineWidth !== undefined,
'state.lineWidth should be defined');
}
this.setFillStrokeStyles_();

View File

@@ -280,19 +280,20 @@ ol.render.webgl.ImageReplay.prototype.drawAsync = goog.abstractMethod;
*/
ol.render.webgl.ImageReplay.prototype.drawCoordinates_ =
function(flatCoordinates, offset, end, stride) {
goog.asserts.assert(goog.isDef(this.anchorX_), 'anchorX is defined');
goog.asserts.assert(goog.isDef(this.anchorY_), 'anchorY is defined');
goog.asserts.assert(goog.isDef(this.height_), 'height is defined');
goog.asserts.assert(goog.isDef(this.imageHeight_), 'imageHeight is defined');
goog.asserts.assert(goog.isDef(this.imageWidth_), 'imageWidth is defined');
goog.asserts.assert(goog.isDef(this.opacity_), 'opacity is defined');
goog.asserts.assert(goog.isDef(this.originX_), 'originX is defined');
goog.asserts.assert(goog.isDef(this.originY_), 'originY is defined');
goog.asserts.assert(goog.isDef(this.rotateWithView_),
goog.asserts.assert(this.anchorX_ !== undefined, 'anchorX is defined');
goog.asserts.assert(this.anchorY_ !== undefined, 'anchorY is defined');
goog.asserts.assert(this.height_ !== undefined, 'height is defined');
goog.asserts.assert(this.imageHeight_ !== undefined,
'imageHeight is defined');
goog.asserts.assert(this.imageWidth_ !== undefined, 'imageWidth is defined');
goog.asserts.assert(this.opacity_ !== undefined, 'opacity is defined');
goog.asserts.assert(this.originX_ !== undefined, 'originX is defined');
goog.asserts.assert(this.originY_ !== undefined, 'originY is defined');
goog.asserts.assert(this.rotateWithView_ !== undefined,
'rotateWithView is defined');
goog.asserts.assert(goog.isDef(this.rotation_), 'rotation is defined');
goog.asserts.assert(goog.isDef(this.scale_), 'scale is defined');
goog.asserts.assert(goog.isDef(this.width_), 'width is defined');
goog.asserts.assert(this.rotation_ !== undefined, 'rotation is defined');
goog.asserts.assert(this.scale_ !== undefined, 'scale is defined');
goog.asserts.assert(this.width_ !== undefined, 'width is defined');
var anchorX = this.anchorX_;
var anchorY = this.anchorY_;
var height = this.height_;