Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Zooming in sometimes shifts focus away from zoomed area #2090
When using mousewheel + STRG on the map-area (I'm not talking about the tileset editor as in #2039), sometimes the zoom focus is no longer on the area where the mouse cursor is.
But as in issue #2039, this is maybe best explained with a .gif:
I've marked some colored areas which I want to zoom on.
I'm not yet sure about what conditions cause the zoom to be off. I'm suspecting that it's somehow connected to the target zone being offset to the red-framed "normal" position of my map?
Right, I suspect the same. Tiled sets a pretty large margin around the map that adjusts to the zoom level. But that means when zooming in, this margin gets smaller and can cause the view to scroll towards the map like is happening in your animation.
In your case, I think the fix would be for Tiled to take into account the layer offsets (which I guess you are using to put that layer outside of your map?), when calculating the map boundaries.
Only the rooftop is located "within" the map; all lower floors have a y-offset.
Your idea for a fix sounds promising.
Reporting this here because I think the bug is still there, though though the cause may be different.
Using Tiled 1.2.4. Windows 7 SP1.
Zooming in on mouse cursor works between 5% up to 50% zoom. Beyond 50%, the zoom focus tends to go upper-left corner.
However, if the current view includes the upper-left corner of the map, then zooming works as expected
Please see this video
Hope this helps. Thanks!