Skip to content

Relayout edge case fixes #1494

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

Merged
merged 2 commits into from
Mar 17, 2017
Merged

Relayout edge case fixes #1494

merged 2 commits into from
Mar 17, 2017

Conversation

etpinard
Copy link
Contributor

The two commits here each fix one relayout edge case broken since #1431 and #1403 respectively.

- this is also done in the default step
- but we need to reset it here to get margin relayout calls
  to not throw excpetions.
- so that they don't throw exceptions with the
  excepted axis container is undefined.
@etpinard etpinard added status: reviewable bug something broken labels Mar 17, 2017
@etpinard etpinard added this to the v1.25.0 milestone Mar 17, 2017
@@ -26,6 +26,8 @@ var toLogRange = require('../../lib/to_log_range');
* same relayout call should override this conversion.
*/
module.exports = function convertCoords(gd, ax, newType, doExtra) {
ax = ax || {};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.. so that e.g. in relayout blank axis objects that pass the forgiving AX_NAME_PATTERN (which also matches zaxis? by the way) don't leave to exceptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @alexcjohnson ⤴️

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, if only I could turn back time and not use linearized coordinates on log axes...

@@ -714,6 +714,7 @@ proto.setConvert = function() {
for(var i = 0; i < 3; ++i) {
var ax = this.fullSceneLayout[axisProperties[i]];
Axes.setConvert(ax, this.fullLayout);
ax.setScale = Lib.noop;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement also appears in the 3d axis_defaults.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need it here to make margin relayout calls work.

I got carried away in #1431 where I 🔪 ed it. My mistake.

@alexcjohnson
Copy link
Collaborator

Looks good. I can't really tell if these problems generalize beyond these fixes or not, so I guess if anything else comes up we'll just have to add more test cases...

💃

@etpinard etpinard merged commit 432d827 into master Mar 17, 2017
@etpinard etpinard deleted the relayout-fixes branch March 17, 2017 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants