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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contour restyle zmin zmax #1653

Merged
merged 5 commits into from
May 9, 2017
Merged

Contour restyle zmin zmax #1653

merged 5 commits into from
May 9, 2017

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented May 8, 2017

fixes #1649

So, turns out that restyling zmin and zmax for contour traces has been broken since v1.0.0 and nobody noticed 馃槕

This PR fixes this by making zmin and zmax redo calcdata as the contour calc does use it. Note that this isn't the case for heatmap traces where zmin and zmax are only used in the plot step.

cc @alexcjohnson

@@ -1624,6 +1624,11 @@ function _restyle(gd, aobj, _traces) {
flags.docalc = true;
}

// some attributes declare a 'recalc' flag
if(valObject.recalc) {
flags.docalc = true;
Copy link
Contributor Author

@etpinard etpinard May 8, 2017

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.

Copy link
Collaborator

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!

Copy link
Contributor Author

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 馃憤

Copy link
Contributor Author

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;
}
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@alexcjohnson
Copy link
Collaborator

Looks good! 馃拑

@etpinard etpinard merged commit 4e2a866 into master May 9, 2017
@etpinard etpinard deleted the contour-restyle-zmin-zmax branch May 9, 2017 15:18
@etpinard etpinard mentioned this pull request Jun 27, 2017
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

restyle zmin & zmax doesn't cause contour maps to redraw
2 participants