Skip to content

Commit

Permalink
Bump wsc
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Nov 17, 2023
1 parent 1aa5fdb commit 28d7fb2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"vtk>=9.2.2,<9.3",
"webviz-config",
"webviz-core-components>=0.6",
"webviz-subsurface-components==0.4.15",
"webviz-subsurface-components==1.0.1",
],
extras_require={"tests": TESTS_REQUIRE},
setup_requires=["setuptools_scm~=3.2"],
Expand Down
23 changes: 17 additions & 6 deletions webviz_subsurface/plugins/_map_viewer_fmu/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ def _update_color_store(
State(get_uuid("tabs"), "value"),
State({"id": get_uuid(LayoutElements.MULTI), "tab": MATCH}, "value"),
State({"id": get_uuid(LayoutElements.DECKGLMAP), "tab": MATCH}, "bounds"),
State({"id": get_uuid(LayoutElements.DECKGLMAP), "tab": MATCH}, "views"),
)
def _update_map(
surface_elements: List[dict],
Expand All @@ -403,6 +404,7 @@ def _update_map(
tab_name: str,
multi: str,
current_bounds: Optional[List],
current_views: Optional[dict],
) -> tuple:
"""Updates the map component with the stored, validated selections"""

Expand Down Expand Up @@ -558,15 +560,24 @@ def _update_map(
"name": make_viewport_label(surface_elements[idx], tab_name, multi),
}
)
views = {
"layout": view_layout(len(surface_elements), view_columns),
"showLabel": True,
"viewports": viewports,
}
updated_view_layout = view_layout(len(surface_elements), view_columns)
if (
current_views
and updated_view_layout == current_views["layout"]
and len(current_views["viewports"]) == len(viewports)
):
updated_views = no_update

else:
updated_views = {
"layout": updated_view_layout,
"showLabel": True,
"viewports": viewports,
}
return (
layer_model.layers,
viewport_bounds if not current_bounds else no_update,
views,
updated_views,
view_annotations,
)

Expand Down

0 comments on commit 28d7fb2

Please sign in to comment.