Skip to content

Commit

Permalink
Merge pull request #47 from mlexchange/center-layout
Browse files Browse the repository at this point in the history
Center layout
  • Loading branch information
hannahker authored Jul 19, 2023
2 parents 414c432 + 02ade52 commit 3d1939a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
.blue>.blue-icon,
.yellow>.yellow-icon {
border: 3px solid black;
}

.mantine-Grid-col > .mantine-1avyp1d {
margin: auto;
}
2 changes: 0 additions & 2 deletions callbacks/image_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ def render_image(
xaxis=dict(visible=False),
yaxis=dict(visible=False),
dragmode="drawopenpath",
height=620,
width=620,
paper_bgcolor="rgba(0,0,0,0)",
plot_bgcolor="rgba(0,0,0,0)",
)
Expand Down
2 changes: 1 addition & 1 deletion components/control_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from utils import data_utils

COMPONENT_STYLE = {
"width": "25vw",
"width": "400px",
"height": "calc(100vh - 40px)",
"padding": "10px",
"borderRadius": "5px",
Expand Down
8 changes: 6 additions & 2 deletions components/image_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from utils.plot_utils import blank_fig

COMPONENT_STYLE = {
"width": "640px",
"width": "calc(-440px + 100vw)",
"height": "calc(100vh - 40px)",
"padding": "10px",
"borderRadius": "5px",
Expand Down Expand Up @@ -88,9 +88,13 @@ def layout():
),
children=[
dcc.Graph(
id="image-viewer", config=FIGURE_CONFIG, figure=blank_fig()
id="image-viewer",
config=FIGURE_CONFIG,
figure=blank_fig(),
style={"margin": "auto", "height": "calc(-150px + 100vh)"},
),
],
style={"display": "flex"},
),
],
)

0 comments on commit 3d1939a

Please sign in to comment.