-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Contour restyle zmin zmax #1653
Conversation
- note the different behavior between heatmap-like and contour-like traces.
src/plot_api/plot_api.js
Outdated
@@ -1624,6 +1624,11 @@ function _restyle(gd, aobj, _traces) { | |||
flags.docalc = true; | |||
} | |||
|
|||
// some attributes declare a 'recalc' flag | |||
if(valObject.recalc) { | |||
flags.docalc = true; |
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.
... slowly migrating to something better than those ugly recalcAttrs
lists in restyle and relayout.
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.
Down the line, this is going to require valObject.dostyle
, .doplot
, .doCamera
etc etc... would we be better off with something like valObject.editType = 'docalc'
etc? Which presumably we could use like a flaglist
(and validate as such in plotschema_test
)?
💯 🍻 for getting this effort going!
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.
valObject.editType = 'docalc'
Right. I guess that scales better. Thanks 👍
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.
done in 413e545
// some attributes declare an 'editType' flaglist | ||
if(valObject.editType === 'docalc') { | ||
flags.docalc = true; | ||
} |
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.
👍
I guess later this can change to something like
if(valObject.editType) {
valObject.editType.split('+').forEach(function(flag) {
flags[flag] = true;
});
}
But don't need to do that now - lets wait until we have validation of editType
, perhaps in plotschema_test?
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.
But don't need to do that now - lets wait until we have validation of editType, perhaps in plotschema_test?
Yep, that's what I was thinking. Referencing #648
Looks good! 💃 |
fixes #1649
So, turns out that restyling
zmin
andzmax
for contour traces has been broken sincev1.0.0
and nobody noticed 😑This PR fixes this by making
zmin
andzmax
redo calcdata as the contour calc does use it. Note that this isn't the case forheatmap
traces wherezmin
andzmax
are only used in the plot step.cc @alexcjohnson