Skip to content

Commit

Permalink
Additional fix for #147
Browse files Browse the repository at this point in the history
  • Loading branch information
espresso3389 committed May 4, 2024
1 parent 96e5f61 commit 9938640
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/src/widgets/pdf_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ class _PdfViewerState extends State<PdfViewer>
Size? _viewSize;
double? _coverScale;
double? _alternativeFitScale;
double _minScale = 0.1;
static const _defaultMinScale = 0.1;
double _minScale = _defaultMinScale;
int? _pageNumber;
bool _initialized = false;
final List<double> _zoomStops = [1.0];
Expand Down Expand Up @@ -591,6 +592,11 @@ class _PdfViewerState extends State<PdfViewer>
} else {
_alternativeFitScale = null;
}
if (_coverScale == null) {
_minScale = _defaultMinScale;
return false;
}

_minScale = !widget.params.useAlternativeFitScaleAsMinScale
? widget.params.minScale
: _alternativeFitScale == null
Expand Down

0 comments on commit 9938640

Please sign in to comment.