Updated ZoomScroller class with function to calculate zoom level