Initialize canvasTooBig_ member

This commit is contained in:
ahocevar
2014-04-03 11:18:12 +02:00
parent 58b5fef3da
commit 54ba06ae3b
@@ -48,7 +48,7 @@ ol.renderer.canvas.TileLayer = function(mapRenderer, tileLayer) {
* @private * @private
* @type {boolean} * @type {boolean}
*/ */
this.canvasTooBig_; this.canvasTooBig_ = false;
/** /**
* @private * @private
@@ -209,7 +209,8 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
this.canvas_ = context.canvas; this.canvas_ = context.canvas;
this.canvasSize_ = [canvasWidth, canvasHeight]; this.canvasSize_ = [canvasWidth, canvasHeight];
this.context_ = context; this.context_ = context;
this.canvasTooBig_ = !this.testCanvasSize(context, this.canvasSize_); this.canvasTooBig_ =
!ol.renderer.canvas.Layer.testCanvasSize(context, this.canvasSize_);
} else { } else {
goog.asserts.assert(!goog.isNull(this.canvasSize_)); goog.asserts.assert(!goog.isNull(this.canvasSize_));
goog.asserts.assert(!goog.isNull(this.context_)); goog.asserts.assert(!goog.isNull(this.context_));
@@ -223,7 +224,8 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
canvas.width = canvasWidth; canvas.width = canvasWidth;
canvas.height = canvasHeight; canvas.height = canvasHeight;
this.canvasSize_ = [canvasWidth, canvasHeight]; this.canvasSize_ = [canvasWidth, canvasHeight];
this.canvasTooBig_ = !this.testCanvasSize(context, this.canvasSize_); this.canvasTooBig_ =
!ol.renderer.canvas.Layer.testCanvasSize(context, this.canvasSize_);
this.renderedCanvasTileRange_ = null; this.renderedCanvasTileRange_ = null;
} else { } else {
canvasWidth = this.canvasSize_[0]; canvasWidth = this.canvasSize_[0];