Make comment about shrinking the canvas more descriptive

This commit is contained in:
ahocevar
2014-04-06 23:54:59 +02:00
parent 732ec7c2db
commit 3848e7f823

View File

@@ -220,7 +220,8 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
this.canvasSize_[1] < canvasHeight ||
(this.canvasTooBig_ && (this.canvasSize_[0] > canvasWidth ||
this.canvasSize_[1] > canvasHeight))) {
// Canvas is too small or too big, resize it
// Canvas is too small, resize it. We never shrink the canvas, unless
// we know that the current canvas size exceeds the maximum size
canvas.width = canvasWidth;
canvas.height = canvasHeight;
this.canvasSize_ = [canvasWidth, canvasHeight];