Remove ol.DEBUG

This commit is contained in:
Tim Schaub
2016-12-29 09:09:24 -07:00
parent 7b9690a691
commit 137cdc04c8
128 changed files with 309 additions and 2027 deletions
-11
View File
@@ -90,13 +90,8 @@ ol.layer.Heatmap = function(opt_options) {
} else {
weightFunction = weight;
}
ol.DEBUG && console.assert(typeof weightFunction === 'function',
'weightFunction should be a function');
this.setStyle(function(feature, resolution) {
ol.DEBUG && console.assert(this.styleCache_, 'this.styleCache_ expected');
ol.DEBUG && console.assert(this.circleImage_ !== undefined,
'this.circleImage_ should be defined');
var weight = weightFunction(feature);
var opacity = weight !== undefined ? ol.math.clamp(weight, 0, 1) : 1;
// cast to 8 bits
@@ -121,7 +116,6 @@ ol.layer.Heatmap = function(opt_options) {
this.setRenderOrder(null);
ol.events.listen(this, ol.render.EventType.RENDER, this.handleRender_, this);
};
ol.inherits(ol.layer.Heatmap, ol.layer.Vector);
@@ -163,8 +157,6 @@ ol.layer.Heatmap.createGradient_ = function(colors) {
ol.layer.Heatmap.prototype.createCircle_ = function() {
var radius = this.getRadius();
var blur = this.getBlur();
ol.DEBUG && console.assert(radius !== undefined && blur !== undefined,
'radius and blur should be defined');
var halfSize = radius + blur + 1;
var size = 2 * halfSize;
var context = ol.dom.createCanvasContext2D(size, size);
@@ -236,9 +228,6 @@ ol.layer.Heatmap.prototype.handleStyleChanged_ = function() {
* @private
*/
ol.layer.Heatmap.prototype.handleRender_ = function(event) {
ol.DEBUG && console.assert(event.type == ol.render.EventType.RENDER,
'event.type should be RENDER');
ol.DEBUG && console.assert(this.gradient_, 'this.gradient_ expected');
var context = event.context;
var canvas = context.canvas;
var image = context.getImageData(0, 0, canvas.width, canvas.height);