ccp4/DUI

Image jumps about when zooming

Opened this issue · 8 comments

The image appears to be aligned with the left edge of the panel and consequently depending on the zoom level the image jumps about when changing zoom levels. It would be better if the image pixel under the mouse cursor remained under the cursor whatever the zoom level (like dials.image_viewer).

I think the mousewheel zoom behaves as intended, zooming in to the point under the cursor, whereas the zoom buttons lock to the left edge. So perhaps the zoom buttons could simply be made to run the function that is linked to the mousewheel?

Ok, I see the issue. I think the zoom button should keep the image centred, so the central pixel in the display window remains the central pixel. The mousewheel works correctly.

I am scrolling via the touchpad. Try zooming out far enough that there is grey space to the right of the image. Also at all zoom levels the image seem to randomly jump about when scrolling.

I think I see what you mean... the zoom only keeps the pixel under the cursor in the same place when the image fills the width of the viewing window. I'm not sure if I see the jumping about, but I notice that when the cursor is off the side of the image then it operates the scrollbars instead

I'm not seeing the jumping clearly present in your animation, so maybe that's platform specific

There's a more subtle effect on linux (RHEL7), but on repeated zooming in and out on the same point (without moving the cursor) the image gradually drifts relative to the cursor.

Right, I see that too on Ubuntu. The image appears to drift to the lower right. This could possibly be related to other issues with the mask tool in which the centres of pixels are rounded to the upper left corner