mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -26,11 +26,12 @@ class ImageHorizontalDragGestureRecognizer
|
||||
if (_initialPosition == null) {
|
||||
return true;
|
||||
}
|
||||
final scale = transformationController.value.row0[0];
|
||||
final storage = transformationController.value.storage;
|
||||
final scale = storage[0];
|
||||
if (scale <= 1.0) {
|
||||
return true;
|
||||
}
|
||||
final double xOffset = transformationController.value.row0[3];
|
||||
final double xOffset = storage[12];
|
||||
final double boundaryEnd = width * scale;
|
||||
final int xPos = (boundaryEnd + xOffset).round();
|
||||
return (boundaryEnd.round() == xPos &&
|
||||
|
||||
@@ -192,7 +192,7 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
|
||||
minScale: widget.minScale,
|
||||
onDismissed: Get.back,
|
||||
onInteractionEnd: (_) =>
|
||||
_onScaleChanged(_transformationController.value.row0[0]),
|
||||
_onScaleChanged(_transformationController.value.storage[0]),
|
||||
child: PageView<ImageHorizontalDragGestureRecognizer>.builder(
|
||||
onPageChanged: _onPageChanged,
|
||||
controller: _pageController,
|
||||
|
||||
Reference in New Issue
Block a user