Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom independent point object size #3356

Closed
natebot13 opened this issue May 15, 2022 · 3 comments · Fixed by #3375
Closed

Zoom independent point object size #3356

natebot13 opened this issue May 15, 2022 · 3 comments · Fixed by #3375
Assignees
Labels
feature It's a feature, not a bug.

Comments

@natebot13
Copy link

natebot13 commented May 15, 2022

Is your feature request related to a problem? Please describe.
Point objects are quite large for low res tile maps. I'm working with an 8x8 tilemap, and the point object covers nearly 6 tiles.

Describe the solution you'd like
It would be nice if the point object scaled with the zoom so it stays a consistent size no matter the zoom, much like google maps pins. This way, in order to access an object under the point, I can simply zoom in and it will "shrink" out of the way. This solution does mean that point objects will look a lot bigger when you zoom out, so either a maximum size or some nonlinear scaling could be applied such that points don't cover maps when zoomed way out.

Describe alternatives you've considered
An alternative could be to have the point object have a configurable size in the settings, or perhaps just a size relative to the current map's tilesize.

@natebot13 natebot13 added the feature It's a feature, not a bug. label May 15, 2022
@bjorn bjorn self-assigned this Jun 1, 2022
bjorn added a commit to bjorn/tiled-dev that referenced this issue Jun 1, 2022
Implemented by ignoring viewport transformations for these objects,
which means point objects are still scaled when exporting a map as an
image.

Closes mapeditor#3356
@bjorn
Copy link
Member

bjorn commented Jun 1, 2022

First of all I've taken the simplest route, which is just to ignore viewport transformations for these objects. That will indeed make them stick out a lot when zooming out far. Please let me know whether that's a problem or not. Builds with this change can soon be found at https://github.com/mapeditor/tiled/actions/runs/2421132404.

@smjnab
Copy link

smjnab commented Jun 7, 2022

First of all I've taken the simplest route, which is just to ignore viewport transformations for these objects. ...

This change made them usable for my needs. In this build I did get a drawing bug after placing a point, see screens with before placing point and after, notice the black duplication and weird lines.

before adding point

after adding point

@bjorn
Copy link
Member

bjorn commented Jun 7, 2022

In this build I did get a drawing bug after placing a point

Ah, thanks for catching that! Should be easy to fix.

@bjorn bjorn closed this as completed in b81264e Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants