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

Configurable interpolation #5

Merged
merged 4 commits into from
Jun 25, 2018

Conversation

etimberg
Copy link
Contributor

Allows configuration between 'linear' and 'logarithmic' interpolation. Log interpolation only works for positive values at the moment.

@tannerlinsley lemme know your thoughts on how to split out the logic. I was thinking about using a file for each type of scale to contain the logic.

@tannerlinsley
Copy link
Collaborator

I love it. I was also thinking that the scales could be exported so instead of a string, you pass the interpolation function:

import ReactRanger, { logInterpolator } from 'react-ranger'

<ReactRanger
	interpolator={logInterpolator}
/>

Thoughts?

@etimberg
Copy link
Contributor Author

Yeah, I like that! Will play around and see how it goes

@etimberg
Copy link
Contributor Author

@tannerlinsley I made a few changes. Created two interpolators and moved them off into their own files.

I tested using the codesandbox setup you have. Once we get a CI in, I can get tests running

@tannerlinsley
Copy link
Collaborator

💯

@tannerlinsley tannerlinsley merged commit b2c790b into TanStack:master Jun 25, 2018
@etimberg etimberg deleted the configurable-interpolation branch June 25, 2018 11:10
@etimberg etimberg mentioned this pull request Jun 25, 2018
@Simek
Copy link

Simek commented Jul 5, 2018

@tannerlinsley When you are planning to release version with this feature to NPM?

@apa-sl
Copy link

apa-sl commented Jul 31, 2018

I also really miss proper non-linear ranges support...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants