keepViewportWithinData property

  1. @override
bool get keepViewportWithinData
override

Keeps the scale and translate sane if true (default).

Setting this to false disables some pan/zoom protections that prevent you from going beyond the data extent.

Implementation

@override
bool get keepViewportWithinData => _viewportSettings.keepViewportWithinData;
  1. @override
set keepViewportWithinData (bool autoAdjustViewportToNiceValues)
override

Implementation

@override
set keepViewportWithinData(bool autoAdjustViewportToNiceValues) {
  _scaleReady = false;
  _viewportSettings.keepViewportWithinData = true;
}