Support rectangular resolution & maximize viewport usage

This commit is contained in:
jdescottes
2014-12-18 21:42:03 +01:00
parent dc61be27f0
commit 2db04fe7d6
7 changed files with 76 additions and 25 deletions

View File

@@ -239,7 +239,7 @@
var displayContext = this.displayCanvas.getContext('2d');
displayContext.save();
if (this.canvas.width*this.zoom < this.displayCanvas.width) {
if (this.canvas.width*this.zoom < this.displayCanvas.width || this.canvas.height*this.zoom < this.displayCanvas.height) {
displayContext.fillStyle = Constants.ZOOMED_OUT_BACKGROUND_COLOR;
displayContext.fillRect(0,0,this.displayCanvas.width, this.displayCanvas.height);
}