I get that part, so that 20%x is the minimal swipe distance which is not really required?
yes it is required because if you put only if x - starx then..
it can be raised only by touching the panel
because let say x = 20.125 and startx is by action_down also 20.125
now if i move my finger only 0.001 then it will be raised and in reallity you dont even need to move your finger for that small distance its enough to touch the panel
so you can play with the value of the movement (instead of 30% you can write 20%)..
but there should be a movement of the finger before it will be raised...