Merge pull request #1956 from ahocevar/shrink-comment

Make comment about shrinking the canvas more descriptive
This commit is contained in:
Andreas Hocevar
2014-04-06 23:55:31 +02:00

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];