Viewport inertial scroll - still available? - (JUCE 6.07)

My viewports used to feature inertial scrolling in both Mac and Windows desktop/plugin builds (back in JUCE 5.x times), and I have called ‘setScrollOnDragEnabled(true)’ - is this feature still supported with mouse dragging?
Did I miss a setting somewhere that initialises smooth inertial scroll? (I don’t see any options in the Viewport doc).


We’ve used Juce since version 5.0 and the viewports never had inertial scrolling for the mouse. But it would be great to add it. Also for mouse-wheel etc.

I’ll make a video and share later - my main graph viewport definitely had inertial scrolling, just got to dig up an older build.

It’s a little choppy due to both GUI refresh rate and screen recording, but you can see that when the mouse stops moving, the graph viewport continues to scroll for a little while (with deceleration).

Maybe you’ve used a timer and implemented that yourself?

No - it’s just a viewport with a component that is bigger than the viewport.

Maybe something about the fact the that component viewed is much bigger (maybe 5X the area) caused this effect… I don’t know - it used to look like it was designed to work that way, and the same code just instantly stops scrolling the window when I stop doing a mouse drag now (I believe since I moved to JUCE 6.07 - but I suppose I’ll have to pull old code and double check this behavior -I’d just assumed it was a built in behavior of JUCE viewport).

Well, I have an old project built on JUCE 5.3 and it exhibits that deceleration behavior on a viewport with viewed component that has no children and is just filled with a black background. (I even just totally stripped that JUCE 5.3 project to just a single window with a viewport (bounds to 600X600) and viewed component (TextEditor with bounds size 3000,3000) - and it still does the scroll deceleration - code:

//editor constructor
        setBounds (0, 0, 600, 600);
        textEditor.setBounds(juce::Rectangle<int>{3000, 3000});
        mViewport.setViewedComponent(&textEditor, false);
        mViewport.setScrollBarsShown(true, true);


OK… well… sorry… it looks like I see this scrolling behavior with my empty test project even if based on JUCE 6.07… maybe that’s not called inertial scroll… I don’t know… nevermind… I will dig into it some more.