fixed damagebounds calculation

This commit is contained in:
Alt, Michael 2019-12-17 09:13:30 +01:00
parent 768f85084b
commit 6ceaafbc18
2 changed files with 35 additions and 24 deletions

View File

@ -56,9 +56,20 @@ export default class Display {
this._backbuffer = document.createElement('canvas');
this._drawCtx = this._backbuffer.getContext('2d');
this._damageBounds = { left: 0, top: 0,
if (this._rotate === 'left' || this._rotate === 'right') {
this._damageBounds = {
left: 0, top: 0,
right: this._backbuffer.height,
bottom: this._backbuffer.width
};
} else {
this._damageBounds = {
left: 0, top: 0,
right: this._backbuffer.width,
bottom: this._backbuffer.height };
bottom: this._backbuffer.height
};
}
Log.Debug("User Agent: " + navigator.userAgent);
@ -468,8 +479,8 @@ export default class Display {
// draw the current tile to the screen
finishTile() {
var x0 = this._tile_x - this._viewportLoc.x;
var y0 = this._tile_y - this._viewportLoc.y;
var x0 = this._tile_x;
var y0 = this._tile_y;
if (this._rotate === 'right') {
var a = x0;
x0 = this._fb_width - y0 - 1;

View File

@ -1,6 +1,6 @@
{
"name": "@gbrehmer/novnc",
"version": "1.1.0-patch9",
"version": "1.1.0-patch10",
"description": "An HTML5 VNC client",
"browser": "lib/rfb",
"directories": {