clampY method

double clampY(
  1. double y,
  2. double zoomRatio
)

Clamp vertical scroll position into valid range.

Implementation

double clampY(double y, double zoomRatio) =>
    y.clamp(0.0, getScrollableMaxY(zoomRatio));