at present, I have written a pop-up window assembly with the effect of pulling up and down. When improving the function, you want to limit the pull up and down when it is out of range.
I control the sliding of the list by controlling translateY.
when the sliding distance is space > 0, the top is out of range. When
is pulled up, it is negative. When the distance is less than space <-200, the bottom content is out of range.
now I want to make the control out of range at range = 100;
so the condition is:
if (space > 0) {
// *= /+
space *= range / (range + space);
}
if (space <-200) {
//
}
The pop-up window moves as much as the value ofspace.