Skip to content

Commit

Permalink
add blink_once and reset_limits to user API
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Nov 27, 2023
1 parent add8f73 commit b20f73a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions jdaviz/configs/default/plugins/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,24 @@ def user_api(self):
'colormap_options', 'set_colormap',
'stretch_options', 'stretch',
'autocut_options', 'cuts',
'marker', 'add_markers', 'remove_markers', 'reset_markers']
'marker', 'add_markers', 'remove_markers', 'reset_markers',
'blink_once', 'reset_limits']
else:
# cubeviz image viewers don't inherit from AstrowidgetsImageViewerMixin yet,
# but also shouldn't expose set_limits because of equal aspect ratio concerns
expose = []
elif isinstance(self, TableViewer):
expose = []
else:
expose = ['set_limits']
expose = ['set_limits', 'reset_limits']
return ViewerUserApi(self, expose=expose)

def reset_limits(self):
"""
Reset viewer axes limits.
"""
self.state.reset_limits()

def set_limits(self, x_min=None, x_max=None, y_min=None, y_max=None):
"""
Set viewer axes limits.
Expand Down

0 comments on commit b20f73a

Please sign in to comment.