moveViewToX method

void moveViewToX(
  1. double xValue
)

Scrolls so the left edge of the content area sits at the given x value, keeping the vertical position within the viewport limits. Runs as a viewport job and redraws (see addViewportJob).

Implementation

void moveViewToX(double xValue) {
  if (!_allFinite([xValue])) return;
  final job = MoveViewJob.getInstance(
    viewPortHandler,
    xValue,
    0,
    getTransformer(AxisDependency.LEFT),
    this,
  );
  addViewportJob(job.run);
}