Ignition - Table Component: Scroll Bar Hide & Selected Row

Pat or anyone,
We are using this code to move the scrollbar based on the selectedRow of a table and it works well as is. But what I really need is a way to just keep the scroll (or Selected Row actually) vertically centered in the table so operators can always see the few lines above and below the currently selected row. Table shows five rows, but there are 25 rows total. I wondered if there is a simple method using scrollpanes, but haven’t found that. Any ideas would be appreciated. Obviously when selectedRow<2 would have to ignore any centering logic. This seems related to another topic here Scroll scrollbar to position via script?