From bfcfddcf699d6ff298920d8f94eb936131c0e990 Mon Sep 17 00:00:00 2001
From: Sebastien Curt <sebastien.curt@tetras-libre.fr>
Date: Wed, 4 May 2022 15:08:31 +0200
Subject: [PATCH] Fix mosaic label category display on top of the mosaic

---
 capsule-prototype/css/mosaic.css          | 1 +
 capsule-prototype/js/MosaicPanelWidget.js | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/capsule-prototype/css/mosaic.css b/capsule-prototype/css/mosaic.css
index 98ef4db..a54def1 100644
--- a/capsule-prototype/css/mosaic.css
+++ b/capsule-prototype/css/mosaic.css
@@ -40,6 +40,7 @@
 	justify-content: left;
 	padding-left: var(--filter-bg-size);
 	align-items: center;
+	flex-grow: 1;
 }
 
 .mosaic_label_filter_enabled {
diff --git a/capsule-prototype/js/MosaicPanelWidget.js b/capsule-prototype/js/MosaicPanelWidget.js
index b400705..753827c 100644
--- a/capsule-prototype/js/MosaicPanelWidget.js
+++ b/capsule-prototype/js/MosaicPanelWidget.js
@@ -124,9 +124,9 @@
                 }
 
                 labels.forEach(l => {
-                    let button = $('<p/>').html(l);
+                    let button = $('<div/>').html($('<h2>' + l + '</h2>'));
                     button.my_state = undefined;
-                    button.addClass('mosaic_label_filter');
+                    button.addClass('mosaic_filter_item mosaic_button');
                     button.click(ev => {
                         if (typeof (ev.target.my_state) === 'undefined') ev.target.my_state = true;
                         else ev.target.my_state = !ev.target.my_state;
-- 
GitLab