onScaleUpdate method

void onScaleUpdate(
  1. double focalX,
  2. double canvasWidth,
  3. double scale
)

Implementation

void onScaleUpdate(double focalX, double canvasWidth, double scale) {
  if (_disposed) return;
  if (!constraints.enablePinchZoom) return;
  if (canvasWidth <= 0 || !canvasWidth.isFinite || !focalX.isFinite) return;
  final s = scale.clamp(0.1, 10.0);
  value = value.zoomAroundCanvas(focalX, canvasWidth, s);
  _applyConstraints();
}