Skip to content

Commit

Permalink
It is counter-clockwise [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Aug 9, 2022
1 parent 93d1b45 commit bdfca0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/imviz/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Simple Image Rotation

This plugins rotates image(s) by the given angle.
You can select viewer but that option only shows when applicable.
You can enter the desired rotation angle in degrees clockwise.
You can enter the desired rotation angle in degrees counter-clockwise.
Click on the :guilabel:`ROTATE` button to finalize.

.. _line-profile-xy:
Expand Down
6 changes: 3 additions & 3 deletions jdaviz/configs/imviz/plugins/rotate_image/rotate_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RotateImageSimple(TemplateMixin, ViewerSelectMixin):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._theta = 0 # degrees, clockwise
self._theta = 0 # degrees, counter-clockwise

def vue_rotate_image(self, *args, **kwargs):
# We only grab the value here to avoid constantly updating as
Expand All @@ -25,8 +25,8 @@ def vue_rotate_image(self, *args, **kwargs):

viewer = self.app._viewer_by_id(self.viewer_selected)

# TODO: Is this really clockwise? Does it take negative angle?
# Rotate selected viewer canvas. This changes zoom too.
# Rotate selected viewer canvas.
# TODO: This changes zoom too? astrofrog will fix translation issue?
affine_transform = Affine2D().rotate_deg(self._theta)
viewer.state.affine_matrix = affine_transform

Expand Down
2 changes: 1 addition & 1 deletion jdaviz/configs/imviz/plugins/rotate_image/rotate_image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
v-model="angle"
type="number"
label="Angle"
hint="Rotation angle in degrees clockwise"
hint="Rotation angle in degrees counter-clockwise"
></v-text-field>
</v-col>
</v-row>
Expand Down

0 comments on commit bdfca0b

Please sign in to comment.