How to make node contents scrollable?

I want to make the node contents scrollable so that I can accommodate more panels(ports) without filling up the entire screen. FYI this is not a group but rather a node with a number of ports. I already checked out https://gojs.net/latest/extensions/ScrollingTable.html but I don’t want the user to click buttons to be able to scroll this, I want this to be scrollable via mouse/touchpad gestures.

Screenshot 2021-02-17 at 4.45.16 PM

That should be possible, if the user mouse-down drags where they cannot start drawing a new link or do any other dragging operation. If I get chance later today, I can implement a sample.

Thanks Walter, some more context or a sample would be really helpful.

Try this: https://gojs.net/extras/TablePanningTool.html
All of the code is in the page.

After some more experience with the (renamed) TablePanningTool, I have improved its implementation to be a bit better to use. You might want to download it again.

1 Like

Thanks Walter

Was wondering is there a way to capture the mouse scroll event via toolManager.doMouseWheel and accordingly scroll the table contents up/down?

Yes, that’s right. Override ToolManager.doMouseWheel to detect that you want to scroll a table rather than scrolling the viewport, and then increment or decrement the Panel.topIndex. But not below zero or above the Panel.rowCount.

I’m busy answering a lot of other requests, so I’m not sure when I’ll be able to do this for you. So I thought I should tell you how right now and maybe you can figure it out for yourself. The implementation I already gave you for mouse events might give you some clues/examples.

Fetch that sample again and see how it handles doMouseWheel.

Yes Walter, thank you so much for your response, I tried that and It works.