Skip to content

Commit

Permalink
fix: height and spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Jul 2, 2024
1 parent a829df0 commit d563364
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions jdaviz/solara.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''))
Expand All @@ -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)

0 comments on commit d563364

Please sign in to comment.