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