Adapt display to be able to handle a changing clipping-setting while connected
This commit is contained in:
parent
7d1dc09ad0
commit
6e296bfa8a
|
@ -229,13 +229,14 @@ var Display;
|
||||||
saveImg = this._drawCtx.getImageData(0, 0, img_width, img_height);
|
saveImg = this._drawCtx.getImageData(0, 0, img_width, img_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canvas.width !== width) { canvas.width = width; }
|
if (canvas.width !== width) {
|
||||||
if (canvas.height !== height) { canvas.height = height; }
|
canvas.width = width;
|
||||||
|
|
||||||
if (this._viewport) {
|
|
||||||
canvas.style.height = height + 'px';
|
|
||||||
canvas.style.width = width + 'px';
|
canvas.style.width = width + 'px';
|
||||||
}
|
}
|
||||||
|
if (canvas.height !== height) {
|
||||||
|
canvas.height = height;
|
||||||
|
canvas.style.height = height + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
if (saveImg) {
|
if (saveImg) {
|
||||||
this._drawCtx.putImageData(saveImg, 0, 0);
|
this._drawCtx.putImageData(saveImg, 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue