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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup for Axes.expand in the early return case #1425

Merged
merged 3 commits into from
Feb 28, 2017
Merged

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Feb 27, 2017

Fixup for commit cebc31c part of the multiple range slider PR #1355

@etpinard etpinard added status: reviewable bug something broken labels Feb 27, 2017
var needsAutorange = (ax.autorange || Lib.nestedProperty(ax, 'rangeslider.autorange'));
var needsAutorange = (
ax.autorange ||
!!Lib.nestedProperty(ax, 'rangeslider.autorange').get()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even if ax.rangeslider is undefined, Lib.nestedProperty(ax, 'rangeslider.autorange') return an object (which is of course truthy) - which made needsAutorange always be truthy, removing the early return 🐎 path.

Copy link
Collaborator

Choose a reason for hiding this comment

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

haha I've made exactly that mistake more than once...

c2l: Number,
type: 'linear',
_length: 100,
_m: 1,
_needsExpand: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's an artefact that of the old range slider + autorange implementation that should've been taken out in cebc31c

My mistake.

@alexcjohnson
Copy link
Collaborator

💃

@etpinard etpinard changed the title Fixup for Axes.expand in the early case Fixup for Axes.expand in the early return case Feb 28, 2017
@etpinard etpinard merged commit a9e1dd6 into master Feb 28, 2017
@etpinard etpinard deleted the axes-expand-fixup branch February 28, 2017 15:17
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.

None yet

2 participants