receiveSyncedZoom method

void receiveSyncedZoom(
  1. double scaleFactor,
  2. double focalPointRatio
)

Handles synchronized zoom from ChartSyncGroup.

Implementation

void receiveSyncedZoom(double scaleFactor, double focalPointRatio) {
  _isReceivingSync = true;
  try {
    final focalPoint = Offset(
      focalPointRatio * _viewport.viewportWidth,
      _viewport.viewportHeight * 0.5,
    );
    _applyZoom(scaleFactor, focalPoint);
  } finally {
    _isReceivingSync = false;
  }
}