-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Hack transition from undefined fill-outline-color #4020
Conversation
// https://github.com/mapbox/mapbox-gl-js/issues/3657 | ||
const transition = this._paintTransitions['fill-outline-color']; | ||
if (!transition.instant()) { | ||
const source = transition.oldTransition._calculateTargetValue(globalProperties, featureProperties); |
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.
This is an unfortunate use of private method _calculateTargetValue
, but my feeling is that it's (slightly) less bad than the only other non-invasive alternative that I could see, which would be to hack interpolate.color so that it can handle undefined values for from
. I prefer the hack here because it's more localized, and will be easier to excise when we get rid of fill-outline-color.
Transcribing from chat
We agreed to go with the second option, but after looking into this (and also, alas, a detour 👇🐰🕳 investigating the first option), I'm now 👎 on removing the underscore. The method we'd have to remove the underscore on, All that said, in 20ea68f i did revise to a slightly cleaner approach by relying on the public--though sorta deep--object hierarchy rather than the private method
|
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.
Closes #3657
Using "option 1" described here
Launch Checklist