mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Zooming is wonky outside map bounds #3860

eishiya posted onGitHub

When zooming in/out, Tiled restricts the map view position so that it's not too far from the map bounds. This means that if a map has Objects far outside of the map bounds, it becomes very annoying to zoom on them, because Tiled keeps resetting the view closer to the map bounds.

Steps to Reproduce

  1. Create a Map. Leave the tile layer empty, or only populated in a small area.
  2. Create an Object Layer and add Objects far away outside the map bounds (or the tiles, in the case of an infinite map).
  3. Attempt to zoom in with the scroll wheel on the distant Objects.
  4. Observe that the map view frames an area closer to the map bounds, potentially nowhere near where you were trying to zoom.

Expectation Tiled should zoom in on this distant area just the same as on anything within the map bounds.

In this gif, the map is infinite, but you can see the calculated map bounds as the green dot in the upper left. tiled_zoomweirdness2

Proposed changes When zooming, Tiled should not try to force the view to be within some bounds at all. If the user is zooming on some location, it's because they want to see it. Only apply the limits when Tiled initiates the zoom, e.g. when opening a map. Alternatively, Tiled should take Objects and Image Layers (and their offsets) into account when calculating the effective bounds for the view, rather than only using the tile layer bounds.

Specifications: Windows 10, Tiled 1.10.2 (me) and Windows 8.1, Tiled 1.10.1 (mingw, who reported this on Discord). I am sure this is a much older issue.


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests