-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Don't offset views rendered on top of snapshots #733
Conversation
@fynngodau for the same purpose you could also call
I do not think this change is really necessary. |
@ovivoda It is true we could also change the place in the maplibre code that calls |
@fynngodau my point here is backwards compatibility. If someone uses the old |
@ovivoda I see. Yes, considering that this API is public, it does consist a breaking change in some sense, though I doubt that any user of the API actively wants exactly a 10x10 shift of the image and therefore I would still prefer to change the default here, and announce the breaking change in a changelog. I'll push a commit that leaves the method intact but changes the documentation so that users are aware of this behavior. |
@fynngodau alright. If you think that this is really a must let's do it like this please:
Then we have the best of both worlds and after some time/versions we can actually remove the old method. But removing it now, or change the behaviour, I do not think it is expected in a library. |
@ovivoda Seems like a good idea. What would be a good method name for such a new method? |
this is a tough one @fynngodau maybe |
95a388e
to
4e69447
Compare
👍, I've added a new commit for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks good! Thanks @fynngodau
This PR fixes view rendered on top of the map during snapshots being offset incorrectly.
For no discernible reason, in mapbox/mapbox-gl-native#9179 (comment), it was introduced that a view that is a child of the map view is rendered 10px to the right, 10px to the bottom of its original position.
This introduces visual glitches already visible in the screenshot linked above. Therefore, this PR removes this offset.
It also fixes any other child views a user may choose to put on a map (the use case I have in mind is custom info windows).
In the following screenshots, bottom is live map, top is snapshot – it is the "Snapshot Activity" in the sample app: