Skip to content

Handle actual zero values as other numbers rather than as unsupplied #1012

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

Closed
wants to merge 2 commits into from

Conversation

monfera
Copy link
Contributor

@monfera monfera commented Oct 5, 2016

Lib.coerce2 to return original value for 0, "", NaN, null rather than false
Perform logic such that a specified zero value doesn't mean false in the contour logic

@monfera monfera changed the title Lib.coerce2 to return original value for 0, "", NaN, null rather than false Handle actual zero values as other numbers rather than as unsupplied Oct 5, 2016
@@ -33,7 +33,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout

var contourStart = Lib.coerce2(traceIn, traceOut, attributes, 'contours.start'),
contourEnd = Lib.coerce2(traceIn, traceOut, attributes, 'contours.end'),
autocontour = coerce('autocontour', !(contourStart && contourEnd));
autocontour = coerce('autocontour', contourStart === false || contourEnd === false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Great. @monfera would you mind adding a test case for this in the contour_test.js suite?

@etpinard etpinard added bug something broken status: reviewable labels Oct 5, 2016
@etpinard
Copy link
Contributor

etpinard commented Jan 6, 2017

done in #1280

@etpinard etpinard closed this Jan 6, 2017
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