Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
  • Loading branch information
kecnry and pllim authored Jan 24, 2024
1 parent d3edf57 commit 8348b5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ API Changes
Cubeviz
^^^^^^^

- ``spatial_subset`` in the spectral extraction plugin is now renamed to ``aperture`` and will
- ``spatial_subset`` in the spectral extraction plugin is now renamed to ``aperture`` and the deprecated name will
be removed in a future release. [#2664]

Imviz
Expand Down
14 changes: 7 additions & 7 deletions jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,12 +2123,12 @@ def _get_mark_coords(self, viewer):
roi.radius_y *= self.scale_factor
elif hasattr(roi, 'center'):
center = roi.center()
width_orig = roi.xmax - roi.xmin
height_orig = roi.ymax - roi.ymin
roi.xmin = center[0] - width_orig/2 * self.scale_factor
roi.xmax = center[0] + width_orig/2 * self.scale_factor
roi.ymin = center[1] - height_orig/2 * self.scale_factor
roi.ymax = center[1] + height_orig/2 * self.scale_factor
half_width = abs(roi.xmax - roi.xmin) * 0.5 * self.scale_factor
half_height = abs(roi.ymax - roi.ymin) * 0.5 * self.scale_factor
roi.xmin = center[0] - half_width
roi.xmax = center[0] + half_width
roi.ymin = center[1] - half_height
roi.ymax = center[1] + half_height
else: # pragma: no cover
raise NotImplementedError

Expand All @@ -2149,7 +2149,7 @@ def _update_mark_coords(self, *args):

class ApertureSubsetSelectMixin(VuetifyTemplate, HubListener):
"""
Applies the SubsetSelect component as a mixin in the base plugin. This
Applies the ApertureSubsetSelect component as a mixin in the base plugin. This
automatically adds traitlets as well as new properties to the plugin with minimal
extra code. For multiple instances or custom traitlet names/defaults, use the
component instead.
Expand Down

0 comments on commit 8348b5b

Please # to comment.