From 9e62a8ddbb8876eb0fb926d8787626c6186df038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 8 Oct 2017 00:02:58 +0200 Subject: [PATCH] make it so default bg is used as canvas bg behind the image --- js/term/screen_renderer.js | 3 +++ sass/pages/_term.scss | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/js/term/screen_renderer.js b/js/term/screen_renderer.js index 66986f5..0a174bd 100644 --- a/js/term/screen_renderer.js +++ b/js/term/screen_renderer.js @@ -92,6 +92,9 @@ module.exports = class ScreenRenderer { this.defaultFgNum = fg this.defaultBgNum = bg this.scheduleDraw('default-colors') + + // full bg with default color (goes behind the image) + this.screen.canvas.style.backgroundColor = this.getColor(bg) } } diff --git a/sass/pages/_term.scss b/sass/pages/_term.scss index 3b82cb5..61e68f9 100644 --- a/sass/pages/_term.scss +++ b/sass/pages/_term.scss @@ -25,6 +25,12 @@ body.term { cursor: default; + canvas { + background-repeat: no-repeat; + background-position: center center; + background-size: contain; + } + canvas.selectable { cursor: text; }