Commit 6e296bfa authored by samhed's avatar samhed

Adapt display to be able to handle a changing clipping-setting while connected

parent 7d1dc09a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment