Remove gratuitous debug assertions
This commit is contained in:
@@ -63,8 +63,6 @@ ol.render.Box.prototype.disposeInternal = function() {
|
||||
ol.render.Box.prototype.render_ = function() {
|
||||
var startPixel = this.startPixel_;
|
||||
var endPixel = this.endPixel_;
|
||||
goog.DEBUG && console.assert(startPixel, 'this.startPixel_ must be truthy');
|
||||
goog.DEBUG && console.assert(endPixel, 'this.endPixel_ must be truthy');
|
||||
var px = 'px';
|
||||
var style = this.element_.style;
|
||||
style.left = Math.min(startPixel[0], endPixel[0]) + px;
|
||||
@@ -106,11 +104,6 @@ ol.render.Box.prototype.setPixels = function(startPixel, endPixel) {
|
||||
* Creates or updates the cached geometry.
|
||||
*/
|
||||
ol.render.Box.prototype.createOrUpdateGeometry = function() {
|
||||
goog.DEBUG && console.assert(this.startPixel_,
|
||||
'this.startPixel_ must be truthy');
|
||||
goog.DEBUG && console.assert(this.endPixel_,
|
||||
'this.endPixel_ must be truthy');
|
||||
goog.DEBUG && console.assert(this.map_, 'this.map_ must be truthy');
|
||||
var startPixel = this.startPixel_;
|
||||
var endPixel = this.endPixel_;
|
||||
var pixels = [
|
||||
|
||||
@@ -498,7 +498,6 @@ ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
|
||||
return;
|
||||
}
|
||||
this.setStyle(style);
|
||||
goog.DEBUG && console.assert(geometry, 'geometry must be truthy');
|
||||
this.drawGeometry(geometry);
|
||||
};
|
||||
|
||||
@@ -852,10 +851,7 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
|
||||
var imageImage = imageStyle.getImage(1);
|
||||
var imageOrigin = imageStyle.getOrigin();
|
||||
var imageSize = imageStyle.getSize();
|
||||
goog.DEBUG && console.assert(imageAnchor, 'imageAnchor must be truthy');
|
||||
goog.DEBUG && console.assert(imageImage, 'imageImage must be truthy');
|
||||
goog.DEBUG && console.assert(imageOrigin, 'imageOrigin must be truthy');
|
||||
goog.DEBUG && console.assert(imageSize, 'imageSize must be truthy');
|
||||
this.imageAnchorX_ = imageAnchor[0];
|
||||
this.imageAnchorY_ = imageAnchor[1];
|
||||
this.imageHeight_ = imageSize[1];
|
||||
|
||||
@@ -116,8 +116,6 @@ ol.renderer.vector.renderFeature_ = function(
|
||||
var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
|
||||
var geometryRenderer =
|
||||
ol.renderer.vector.GEOMETRY_RENDERERS_[simplifiedGeometry.getType()];
|
||||
goog.DEBUG && console.assert(geometryRenderer !== undefined,
|
||||
'geometryRenderer should be defined');
|
||||
geometryRenderer(replayGroup, simplifiedGeometry, style, feature);
|
||||
};
|
||||
|
||||
@@ -135,8 +133,6 @@ ol.renderer.vector.renderGeometryCollectionGeometry_ = function(replayGroup, geo
|
||||
for (i = 0, ii = geometries.length; i < ii; ++i) {
|
||||
var geometryRenderer =
|
||||
ol.renderer.vector.GEOMETRY_RENDERERS_[geometries[i].getType()];
|
||||
goog.DEBUG && console.assert(geometryRenderer !== undefined,
|
||||
'geometryRenderer should be defined');
|
||||
geometryRenderer(replayGroup, geometries[i], style, feature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -987,9 +987,6 @@ ol.render.webgl.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
|
||||
var replay = this.replays_[replayType];
|
||||
if (replay === undefined) {
|
||||
var constructor = ol.render.webgl.BATCH_CONSTRUCTORS_[replayType];
|
||||
goog.DEBUG && console.assert(constructor !== undefined,
|
||||
replayType +
|
||||
' constructor missing from ol.render.webgl.BATCH_CONSTRUCTORS_');
|
||||
replay = new constructor(this.tolerance_, this.maxExtent_);
|
||||
this.replays_[replayType] = replay;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user