I’m 99% sure I’ve seen this here somewhere before but I can’t find it.
Here’s a very simple implementation of a dynamic panel drag with momentum and drag. The one weird thing now is it doesn’t reset if you change directions while dragging so you’ll see some counterintuitive behavior if you do that.
It’s kind of fun to play with and I think reasonably mimics some of the physics-enabled drag behavior seen in some mobile OSes and apps.