From 3bbe8710024b0745c2fc8ac849588b2cf2404fe3 Mon Sep 17 00:00:00 2001 From: Mario Buikhuizen Date: Tue, 2 Jul 2024 13:55:22 +0200 Subject: [PATCH] fix: height and spacing --- jdaviz/solara.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/jdaviz/solara.py b/jdaviz/solara.py index 30e7a5ddb4..382606686e 100644 --- a/jdaviz/solara.py +++ b/jdaviz/solara.py @@ -28,6 +28,19 @@ def Page(): ipyvue.register_component_from_file('g-viewer-tab', "container.vue", jdaviz.__file__) + solara.Style(""" + .solara-content-main { + padding-top: 0 !important; + } + .widget-output { + margin: 0; + } + .v-content.jdaviz__content--not-in-notebook { + height: 100vh; + max-height: 100vh; + } + """) + if not len(data_list): from jdaviz.core.launcher import Launcher launcher = Launcher(height='100%', filepath=(data_list[0] if len(data_list) == 1 else '')) @@ -42,11 +55,4 @@ def Page(): else: viz.load_data(data, **load_data_kwargs) - viz.app.template.template = viz.app.template.template.replace( - 'calc(100% - 48px);', '800px' # '80vh !important;' - ) - - height = '800px' - viz.app.layout.height = height - viz.app.state.settings['context']['notebook']['max_height'] = height solara.display(viz.app)