Remove goog.isNull in layer classes
This commit is contained in:
@@ -106,8 +106,7 @@ ol.layer.Heatmap = function(opt_options) {
|
||||
'weightFunction should be a function');
|
||||
|
||||
this.setStyle(goog.bind(function(feature, resolution) {
|
||||
goog.asserts.assert(!goog.isNull(this.styleCache_),
|
||||
'this.styleCache_ should not be null');
|
||||
goog.asserts.assert(this.styleCache_, 'this.styleCache_ expected');
|
||||
goog.asserts.assert(this.circleImage_ !== undefined,
|
||||
'this.circleImage_ should be defined');
|
||||
var weight = weightFunction(feature);
|
||||
@@ -252,8 +251,7 @@ ol.layer.Heatmap.prototype.handleStyleChanged_ = function() {
|
||||
ol.layer.Heatmap.prototype.handleRender_ = function(event) {
|
||||
goog.asserts.assert(event.type == ol.render.EventType.RENDER,
|
||||
'event.type should be RENDER');
|
||||
goog.asserts.assert(!goog.isNull(this.gradient_),
|
||||
'this.gradient_ should not be null');
|
||||
goog.asserts.assert(this.gradient_, 'this.gradient_ expected');
|
||||
var context = event.context;
|
||||
var canvas = context.canvas;
|
||||
var image = context.getImageData(0, 0, canvas.width, canvas.height);
|
||||
|
||||
Reference in New Issue
Block a user