diff options
author | samhed <samuel@cendio.se> | 2015-06-25 14:58:57 +0200 |
---|---|---|
committer | samhed <samuel@cendio.se> | 2015-06-25 22:37:05 +0200 |
commit | 6e296bfa8acbc19d8fd0d5ba5836f902e48ce09f (patch) | |
tree | 3e1bb2e4b4fe810e53d59421ae3a6c5d1ca2ac72 | |
parent | 7d1dc09ad0010924c6940832225e5eb2dc803f4f (diff) | |
download | novnc-6e296bfa8acbc19d8fd0d5ba5836f902e48ce09f.tar.gz |
Adapt display to be able to handle a changing clipping-setting while connected
-rw-r--r-- | include/display.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/display.js b/include/display.js index 9a8e455..8994856 100644 --- a/include/display.js +++ b/include/display.js @@ -229,13 +229,14 @@ var Display; saveImg = this._drawCtx.getImageData(0, 0, img_width, img_height); } - if (canvas.width !== width) { canvas.width = width; } - if (canvas.height !== height) { canvas.height = height; } - - if (this._viewport) { - canvas.style.height = height + 'px'; + if (canvas.width !== width) { + canvas.width = width; canvas.style.width = width + 'px'; } + if (canvas.height !== height) { + canvas.height = height; + canvas.style.height = height + 'px'; + } if (saveImg) { this._drawCtx.putImageData(saveImg, 0, 0); |