diff --git a/glue_jupyter/common/state_widgets/viewer_image.py b/glue_jupyter/common/state_widgets/viewer_image.py index 9d58143a..dab73809 100644 --- a/glue_jupyter/common/state_widgets/viewer_image.py +++ b/glue_jupyter/common/state_widgets/viewer_image.py @@ -1,9 +1,11 @@ from glue.viewers.image.state import AggregateSlice from glue.core.coordinate_helpers import world_axis import ipyvuetify as v +import ipywidgets as widgets import traitlets from ...state_traitlets_helpers import GlueState from ...vuetify_helpers import link_glue_choices +from ...widgets import AxesLimits __all__ = ['ImageViewerStateWidget'] @@ -28,6 +30,8 @@ class ImageViewerStateWidget(v.VuetifyTemplate): sliders = traitlets.List().tag(sync=True) + axes_limits_widget = traitlets.Any().tag(sync=True, **widgets.widget_serialization) + def __init__(self, viewer_state): super().__init__() @@ -54,6 +58,8 @@ def __init__(self, viewer_state): self._sync_sliders_from_state() + self.axes_limits_widget = AxesLimits(viewer_state) + def _sync_sliders_from_state(self, *not_used): if self.viewer_state.reference_data is None or self.viewer_state.slices is None: diff --git a/glue_jupyter/common/state_widgets/viewer_image.vue b/glue_jupyter/common/state_widgets/viewer_image.vue index 72e21f7c..03bbe1ed 100644 --- a/glue_jupyter/common/state_widgets/viewer_image.vue +++ b/glue_jupyter/common/state_widgets/viewer_image.vue @@ -28,6 +28,9 @@ v-if="glue_state.slices && glue_state.slices.length > 0" wait="300" :max="slider.max" :value.sync="glue_state.slices[slider.index]" hide-details /> +