Skip to content

Commit

Permalink
Workflows: more map layout fixes [EC-791, EC-792] (#5930)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 4ee27bb2c326c0b6026252ac08b64f379243fb72
  • Loading branch information
gjoseph92 authored and Descartes Labs Build committed Dec 10, 2019
1 parent 4079b55 commit 8c1388d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion descarteslabs/workflows/interactive/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def __init__(self, image, *args, **kwargs):
self.set_trait(
"autoscale_progress",
ClearableOutput(
widgets.Output(), layout=widgets.Layout(max_height="20rem")
widgets.Output(),
layout=widgets.Layout(max_height="10rem", flex="1 0 auto"),
),
)
self.set_parameters(**params)
Expand Down
3 changes: 2 additions & 1 deletion descarteslabs/workflows/interactive/layer_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def __init__(self, map):
# initialize with the current layers on the map, if any

self.layout.overflow = "auto"
self.layout.max_height = "30rem"
self.layout.max_height = "12rem"
self.layout.flex = "1 0 auto"

def _layers_changed(self, change):
new_layers = change["new"]
Expand Down
4 changes: 3 additions & 1 deletion descarteslabs/workflows/interactive/lonlat.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ def __init__(self, map):

super(PositionController, self).__init__(children=(lonlat, zoom_label, zoom))

self.layout.overflow = "initial"
self.layout.overflow = "hidden"
self.layout.flex = "1 0 auto"
self.layout.padding = "2px 0"
7 changes: 5 additions & 2 deletions descarteslabs/workflows/interactive/map_.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,18 @@ def on_clear():
pass

self.errors = ClearableOutput(
map.error_log, on_clear=on_clear, layout=widgets.Layout(max_height="20rem")
map.error_log,
on_clear=on_clear,
layout=widgets.Layout(max_height="20rem", flex="1 0 auto"),
)

self.autoscale_outputs = widgets.VBox(
[
x.autoscale_progress
for x in reversed(self.map.layers)
if isinstance(x, WorkflowsLayer)
]
],
layout=widgets.Layout(flex="1 0 auto", max_height="16rem"),
)

super(MapApp, self).__init__(
Expand Down

0 comments on commit 8c1388d

Please sign in to comment.