Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Some information #1

Open
Angelk90 opened this issue Nov 5, 2018 · 2 comments
Open

Some information #1

Angelk90 opened this issue Nov 5, 2018 · 2 comments
Assignees

Comments

@Angelk90
Copy link
Contributor

Angelk90 commented Nov 5, 2018

Hi @prscX , congratulations on the new project.

Some doubts:

  1. I took a look at the formula you use, the one that is written in the readme:
    min + ((min - max) * position)
    But it should not be:
    min + ((max - min) * position)
    otherwise, for the maximum value we get negative values.

  2. It would be possible to add an attribute to specify the value that is not specified between [0,1].
    Example the formula is: value = [10,180]
    position = (value-min) / (max - min)
    position (initialPosition) would be a value between [0,1].
    I do not know if I explained myself well.

  3. In the image you can see that you can also put images as a minimum and maximum value.
    It can be done?

@prscX prscX self-assigned this Nov 5, 2018
@prscX
Copy link
Owner

prscX commented Nov 5, 2018

Thanks @Angelk90 for sharing your thoughts:

1). Completely agree with your observation. Please let me know in case you are planning to share PR for the same or I should look into the same.

2). Basically we need a formula to derive position range [0, 1] based on min and max value. I will give a thought on this. Please let me know in case you have any thoughts.

3). Images are not currently not planned and supported.

Thanks
</ Pranav >

@Angelk90
Copy link
Contributor Author

Angelk90 commented Nov 5, 2018

@prscX : I thought a little about the situation.
I realized that two problems arise:

  1. At the time that we set initialPosition, the values ​​of _min and _max are 0.
    Therefore it can not be calculated using the formula.
    Is there a method that runs immediately where the props settings and before the component is rendered?

  2. Consider this example of interval [50,80]:

  • case min, if we set an initialPosition value lower than 50 how should we behave?
  • max case, if we set an initialPosition value greater than 80 how should we behave?

@Angelk90 Angelk90 mentioned this issue Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants