Viewport "magnetic" scroll...?

It’s a really common idiom for viewport-style views (aka “scrollviews”) to allow the scroll view to be scrolled past the bounds of the viewed component by a small amount and then for the viewed component to animate back to the top of the scroll view when the mouse is released.

This is used in most web browsers when you attempt to scroll past the top of the top of a page. It is also found in native Mac and iOS ScrollView components, probably elsewhere.

Is there any way to achieve this with JUCE’s ViewPort…?

I’m so used to this behaviour that having the scrollview just “stop” when the scroll limits are reached feels odd.