Skip to content

Commit

Permalink
Add min-height attribute style to dbc.Col
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Apr 7, 2021
1 parent 68c5db0 commit 1ea709d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ertviz/assets/ert-style.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"dbc-column": {
"min-height": "500px"
},
"ensemble-selector": {
"stylesheet": [
{
Expand Down
7 changes: 2 additions & 5 deletions ertviz/controllers/plot_view_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ertviz.views import response_view, parameter_view
import ertviz.controllers
from ertviz.plugins._webviz_ert import WebvizErtPluginABC
import ertviz.assets as assets


def _get_child(response: str, children: List[Component]) -> Optional[Component]:
Expand Down Expand Up @@ -93,11 +94,7 @@ def create_grid(

col_width = max(6, 12 // max(1, len(new_children)))
bootstrapped_children = [
dbc.Col(
child,
xl=col_width,
lg=12,
)
dbc.Col(child, xl=col_width, lg=12, style=assets.ERTSTYLE["dbc-column"])
for child in new_children
]
return dbc.Row(bootstrapped_children), new_children
6 changes: 5 additions & 1 deletion ertviz/plugins/_response_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
correlation_view,
parameter_selector_view,
)

import ertviz.assets as assets
import ertviz.models
from ertviz.plugins._webviz_ert import WebvizErtPluginABC
import ertviz.controllers
Expand Down Expand Up @@ -127,27 +127,31 @@ def layout(self) -> Component:
id_view=self.uuid("response-overview"),
),
width=3,
style=assets.ERTSTYLE["dbc-column"],
),
dbc.Col(
correlation_view(
parent=self,
id_view=self.uuid("response-scatterplot"),
),
width=3,
style=assets.ERTSTYLE["dbc-column"],
),
dbc.Col(
correlation_view(
parent=self,
id_view=self.uuid("response-correlation"),
),
width=3,
style=assets.ERTSTYLE["dbc-column"],
),
dbc.Col(
correlation_view(
parent=self,
id_view=self.uuid("response-heatmap"),
),
width=3,
style=assets.ERTSTYLE["dbc-column"],
),
]
),
Expand Down

0 comments on commit 1ea709d

Please sign in to comment.