cds-astro / aladin-lite

An astronomical HiPS visualizer in the browser
https://aladin.cds.unistra.fr/AladinLite/
GNU General Public License v3.0
103 stars 42 forks source link

Prefer zooming on the screen scaling factor instead of the fov value #202

Open bmatthieu3 opened 1 month ago

bmatthieu3 commented 1 month ago

I think it would be more stable if the zooming directly influences the scaling factor of the screen image and not the fov which gives different scaling factors in function of the projection used. Internally aladin lite would have to compute the fov from a specific scaling factor.

tboch commented 1 month ago

Can you elaborate on this? Would that imply having the FoV value changed when changing projection?

bmatthieu3 commented 1 month ago

No because when changing the projection we can still reset the screen scaling factor of the screen with respect to the current fov. I noticed a delta of fov degrees (i.e. one wheel event) influences differently the screen scaling factor in function of the projection chosen (this is especially true for all sky view). It provides a different zooming effect (more or less fast) in function of the projection. It is more relevant and projection agnostic to treat the wheel events as a way to directly change the scaling factor (in the screen space) instead of the fov degrees (which is a sky quantity).