Skip to content

Commit

Permalink
Merge pull request #15 from astropy/zoom-updates
Browse files Browse the repository at this point in the history
Zoom updates
  • Loading branch information
mwcraig committed Aug 5, 2018
2 parents 54e4589 + 19a26a9 commit 57dd5d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion astrowidgets/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def zoom(self, val):
See `zoom_level`.
"""
self._viewer.scale_to(val, val)
self.zoom_level = self.zoom_level * val

@property
def is_marking(self):
Expand Down
2 changes: 2 additions & 0 deletions astrowidgets/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ def test_zoom_level():

def test_zoom():
image = ImageWidget()
image.zoom_level = 3
val = 2
image.zoom(val)
assert image.zoom_level == 6


@pytest.mark.xfail(reason='Not implemented yet')
Expand Down

0 comments on commit 57dd5d7

Please sign in to comment.