-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixup for Axes.expand
in the early return case
#1425
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
Conversation
- rm obsolete _needsExpand - mock with `ax.autorange: true`
var needsAutorange = (ax.autorange || Lib.nestedProperty(ax, 'rangeslider.autorange')); | ||
var needsAutorange = ( | ||
ax.autorange || | ||
!!Lib.nestedProperty(ax, 'rangeslider.autorange').get() |
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.
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.
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.
haha I've made exactly that mistake more than once...
c2l: Number, | ||
type: 'linear', | ||
_length: 100, | ||
_m: 1, | ||
_needsExpand: 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.
That's an artefact that of the old range slider + autorange implementation that should've been taken out in cebc31c
My mistake.
💃 |
Axes.expand
in the early caseAxes.expand
in the early return case
Fixup for commit cebc31c part of the multiple range slider PR #1355