You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.
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.
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.
In the image you can see that you can also put images as a minimum and maximum value.
It can be done?
The text was updated successfully, but these errors were encountered:
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.
@prscX : I thought a little about the situation.
I realized that two problems arise:
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?
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?
Hi @prscX , congratulations on the new project.
Some doubts:
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.
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.
In the image you can see that you can also put images as a minimum and maximum value.
It can be done?
The text was updated successfully, but these errors were encountered: