Better mapbox trace / layout-layer *below*#4058
Merged
Conversation
... to be consistent with traces/*mapbox/ modules
We now handle below logic (mostly) at the subplot level in
subplot.fillBelowLookup() and subplot.belowLookup.
This allows us to handle many edges cases in a cleaner way.
In brief,
+ we collect set trace/layout-layer below value,
OR find their "smart" default value
+ each trace/layout-layer stash a below state value
+ if new below doesn't match old before, we must remove/add layer
+ if many traces/layout have same below value, we place choroplethmapbox,
then densitymapbox, scattermapbox and finally layout layers
in that order.
+ on update, if many traces/layout-layer have same below,
we must in general remove/add all those layers
to have the correct ordering
Additional notes:
- we no longer need to handle below in convert.js routines
- getBelow is now a trace _module.getBelow method, so that it
can get called before mapbox-trace object creation
- new subplot.getMapLayer method to DRY things up
... to Lib.warn users when *below* is invalid.
archmoj
reviewed
Jul 19, 2019
Contributor
|
💃 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR resolves #4050 and resolves #4049
Commit 8a4e8f1 does most of the work here. Please carefully read the commit message for some rationale and tests.
Commit 853a391 should help users debug. The other commits are cleanup commits.
cc @plotly/plotly_js @nicolaskruchten