diff --git a/kasmweb/core/display.js b/kasmweb/core/display.js index 8c52c54..346f9fd 100644 --- a/kasmweb/core/display.js +++ b/kasmweb/core/display.js @@ -74,7 +74,6 @@ export default class Display { this._scale = 1.0; this._clipViewport = false; - this.logo = null; // ===== EVENT HANDLERS ===== @@ -303,15 +302,8 @@ export default class Display { } clear() { - if (this._logo) { - this.resize(this._logo.width, this._logo.height); - this.imageRect(0, 0, - this._logo.width, this._logo.height, - this._logo.type, this._logo.data); - } else { - this.resize(240, 20); - this._drawCtx.clearRect(0, 0, this._fb_width, this._fb_height); - } + this.resize(240, 20); + this._drawCtx.clearRect(0, 0, this._fb_width, this._fb_height); this.flip(); } diff --git a/kasmweb/docs/API-internal.md b/kasmweb/docs/API-internal.md index 9b69a07..cef79a4 100644 --- a/kasmweb/docs/API-internal.md +++ b/kasmweb/docs/API-internal.md @@ -84,7 +84,6 @@ None | name | type | mode | default | description | ------------ | ----- | ---- | ------- | ------------ -| logo | raw | RW | | Logo to display when cleared: {"width": width, "height": height, "type": mime-type, "data": data} | scale | float | RW | 1.0 | Display area scale factor 0.0 - 1.0 | clipViewport | bool | RW | false | Use viewport clipping | width | int | RO | | Display area width @@ -100,7 +99,7 @@ None | absY | (y) | Return Y relative to the remote display | resize | (width, height) | Set width and height | flip | (from_queue) | Update the visible canvas with the contents of the rendering canvas -| clear | () | Clear the display (show logo if set) +| clear | () | Clear the display | pending | () | Check if there are waiting items in the render queue | flush | () | Resume processing the render queue unless it's empty | fillRect | (x, y, width, height, color, from_queue) | Draw a filled in rectangle diff --git a/kasmweb/tests/test.display.js b/kasmweb/tests/test.display.js index b359550..2da47cf 100644 --- a/kasmweb/tests/test.display.js +++ b/kasmweb/tests/test.display.js @@ -269,9 +269,8 @@ describe('Display/Canvas Helper', function () { display.resize(4, 4); }); - it('should clear the screen on #clear without a logo set', function () { + it('should clear the screen on #clear', function () { display.fillRect(0, 0, 4, 4, [0x00, 0x00, 0xff]); - display._logo = null; display.clear(); display.resize(4, 4); const empty = []; @@ -279,18 +278,6 @@ describe('Display/Canvas Helper', function () { expect(display).to.have.displayed(new Uint8Array(empty)); }); - it('should draw the logo on #clear with a logo set', function (done) { - display._logo = { width: 4, height: 4, type: "image/png", data: make_image_png(checked_data) }; - display.clear(); - display.onflush = () => { - expect(display).to.have.displayed(checked_data); - expect(display._fb_width).to.equal(4); - expect(display._fb_height).to.equal(4); - done(); - }; - display.flush(); - }); - it('should not draw directly on the target canvas', function () { display.fillRect(0, 0, 4, 4, [0, 0, 0xff]); display.flip();