summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsamhed <samuel@cendio.se>2015-06-25 14:58:57 +0200
committersamhed <samuel@cendio.se>2015-06-25 22:37:05 +0200
commit6e296bfa8acbc19d8fd0d5ba5836f902e48ce09f (patch)
tree3e1bb2e4b4fe810e53d59421ae3a6c5d1ca2ac72
parent7d1dc09ad0010924c6940832225e5eb2dc803f4f (diff)
downloadnovnc-6e296bfa8acbc19d8fd0d5ba5836f902e48ce09f.tar.gz
Adapt display to be able to handle a changing clipping-setting while connected
-rw-r--r--include/display.js11
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);