Comments (4)
Oh, it's about relative vs absolute zoom. That is get/set of zoom
is all that is needed for the functionality, but something along the lines of this is useful:
def zoom(factor):
self.zoom_level = self.zoom_level*factor
So it's really just trivial syntactic sugar. Now that I look at that, perhaps an alternative is to just tell users to do self.zoom_level *= factor
, though? As long as zoom_level
is a multiplicative factor rather than a non-linear thing like some other js image viewers I've seen, anyway.
from astrowidgets.
I implemented what I just said above in #15 ...
however, that made me realize a confusing element: ginga
distinguishes between "zoom" and "scale". As I understand it, scale is 2d (x and y), while zoom is a fixed change. But zoom is also distinguished by the "rate" being settable. Presumably this is to facilitate user interaction to make the zoom be faster.
My instinct is that the API we're using here is a bit better for the purpose we have here because it's simpler, and is what I think more people have in mind when they think of "zooming" (of course I would since I wrote it
from astrowidgets.
Looks like #15 is merged. I'm okay with current implementation. We can revisit extra functionality if users complain about not able to set zoom the other way. Should we close this?
from astrowidgets.
Closed by #15
from astrowidgets.
Related Issues (20)
- Add API to deal with astropy regions
- Ginga: Remove use_opencv keyword HOT 1
- rename offset_to to offset_byand have it use units HOT 4
- Consider making `marker` private and instead only set it in `add_markers` or `start_marking` HOT 6
- Change marker from a dictionary to a class or `namedtuple`, and change the name from `marker` to `marker_style` HOT 2
- Zoom: Why two ways to do the same thing? HOT 6
- Setting stretch as a string is problematic if the stretch requires a parameter HOT 5
- Coordinates in cursor display may not be RA/Dec HOT 12
- TST: devdeps broken due to jinja2 and markupsafe conflicts HOT 1
- TST: devdeps broken because _mouse_click_cb creates canvas object with coord being None HOT 4
- deprecation of 'raDegToString' from 'ginga.util.wcs' HOT 6
- TST: image.stretch setter fails with Ginga dev HOT 2
- File loading: Just have one "load" method and let backend decide on its own what to load
- Move backend specific implementations out of this repo
- Integration test with backends and instruction for downstream testing
- Policy on how backend can propose API changes to established Protocol HOT 2
- Add more types to the protocol HOT 1
- INFO: Ginga marker parameters HOT 1
- INFO: bqplot marker properties
- INFO: matplotlib marker properties
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astrowidgets.