Merge pull request #1956 from ahocevar/shrink-comment
Make comment about shrinking the canvas more descriptive
This commit is contained in:
@@ -220,7 +220,8 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
|
|||||||
this.canvasSize_[1] < canvasHeight ||
|
this.canvasSize_[1] < canvasHeight ||
|
||||||
(this.canvasTooBig_ && (this.canvasSize_[0] > canvasWidth ||
|
(this.canvasTooBig_ && (this.canvasSize_[0] > canvasWidth ||
|
||||||
this.canvasSize_[1] > canvasHeight))) {
|
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.width = canvasWidth;
|
||||||
canvas.height = canvasHeight;
|
canvas.height = canvasHeight;
|
||||||
this.canvasSize_ = [canvasWidth, canvasHeight];
|
this.canvasSize_ = [canvasWidth, canvasHeight];
|
||||||
|
|||||||
Reference in New Issue
Block a user