This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
[core] Update ZoomHistory.lastInteger{Zoom,Time} if different from floor zoom - #9760
Merged
Merged
Conversation
brunoabinader
force-pushed
the
test-api-zoom-history
branch
from
August 13, 2017 09:43
09b629a to
6b77020
Compare
tmpsantos
approved these changes
Aug 14, 2017
brunoabinader
force-pushed
the
test-api-zoom-history
branch
from
August 14, 2017 15:24
6b77020 to
67f5602
Compare
jfirebaugh
suggested changes
Aug 14, 2017
jfirebaugh
left a comment
Contributor
There was a problem hiding this comment.
This doesn't look right to me -- it's going to result in lastIntegerZoomTime getting set to now on any zoom change. The intent is that lastIntegerZoomTime changes only when crossing an integer zoom level.
Contributor
Author
True indeed - thanks for pointing that out @jfirebaugh. I'll rework the patch to enforce we won't be changing |
brunoabinader
force-pushed
the
test-api-zoom-history
branch
from
August 21, 2017 17:42
67f5602 to
5f22408
Compare
Contributor
Author
|
Modified the patch behavior to comply with @jfirebaugh's comments on preserving |
jfirebaugh
approved these changes
Aug 22, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imagine the following scenario:
1.0ZoomHistory.firstis triggered, causingZoomHistory.lastIntegerZoomto be 1.0.0ZoomHistory.lastIntegerZoomis still 1.0.5ZoomHistory.lastIntegerZoomshould be now 0, but it remains as 1.This happens because we don't update
ZoomHistory.lastInteger{Zoom,Time}when the floor value of the last and current zooms are the same. However, we cannot assume that the last integer zoom remains the same (like the scenario above).This is currently causing some rendering artifacts (blurry lines) due to the algorithm we use for evaluating the
line-dasharrayproperty here:The difference might be subtle, but causes our
line-dasharrayrender tests to fail in #9689 when reusing the map object due to the previous erroneous state inZoomHistory.