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

Fix cross-fading of *-pattern and line-dasharray #5791

Merged
merged 7 commits into from
Dec 4, 2017
Merged

Conversation

jfirebaugh
Copy link
Contributor

@jfirebaugh jfirebaugh commented Dec 1, 2017

Fixes #5740. Quite a bit of refactoring was needed to make this feasible:

  • Needed to avoid serializing PossiblyEvaluatedPropertyValue (1st commit)
  • Needed to rework the interaction and parameter passing between Map#_render, Style#update, and Style#_recalculate (2nd through 5th commits)
  • Needed to remove _placementDirty from Map#loaded(), otherwise the test case hangs (6th commit)

https://bl.ocks.org/anonymous/raw/17fa5e060a121799adc5f80f6d722e06/

This saves needing to serialize these properties.
loaded() is an indication of data completeness, not rendering quiescence. Transitory effects (transitions, cross-fading, collision fading) are not included by design.
@ChrisLoer
Copy link
Contributor

I only looked at the _placementDirty change, which I think is fine using the interpretation of loaded() to mean "all data has loaded", because in the current code any data loading will have triggered an accompanying full placement.

@ansis this is something to watch out for with the placement back-port. In the context of tests, I think we almost always want to just do placement before each frame (unless we're specifically testing a transition where placement timing matters).

Post-back-port, I'm not sure what the right behavior for loaded() should be in the case where we've loaded a new tile but haven't yet run placement on it. If you consider the placement just part of a transition animation, then maybe it's OK to return "true" just like we would if there were some other style transition in progress (although even there, we'd only return "true" if you called loaded from within a handler for the load signal, because we'd set _styleDirty right after firing the signal). But placement doesn't just affect rendering: it also affects the results of queryRenderedFeatures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants