From 87ce71501132adc7cc3d139cb24807cf07d96299 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 14 Jun 2023 22:23:22 +0000 Subject: [PATCH] This appears to let me shrink the sparkline graphs. Freaking CSS. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4323 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/client.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/client.js b/core/client.js index a9ce7e64..003b4c6f 100644 --- a/core/client.js +++ b/core/client.js @@ -79,6 +79,9 @@ class TfNavigationElement extends LitElement { get_spark_line(key, options) { if (!this.spark_lines[key]) { let spark_line = document.createElement('tf-sparkline'); + spark_line.style.display = 'flex'; + spark_line.style.flexDirection = 'row'; + spark_line.style.flex = '0 100 10em'; spark_line.title = key; if (options) { if (options.max) { @@ -133,7 +136,7 @@ class TfNavigationElement extends LitElement { ${this.status.message} ${this.render_permissions()} - ${Object.keys(this.spark_lines).sort().map(x => this.spark_lines[x]).map(x => [x.dataset.emoji, x])} + ${Object.keys(this.spark_lines).sort().map(x => this.spark_lines[x]).map(x => [x.dataset.emoji, x])} ${this.render_login()} `; @@ -315,7 +318,7 @@ class TfSparkLineElement extends LitElement { render() { let max = Math.round(10.0 * Math.max(...this.lines.map(line => line.values[line.values.length - 1]))) / 10.0; return html` - + ${this.lines.map(x => this.render_line(x))} ${max}