show video restore btn if translated

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-11-17 21:39:53 +08:00
parent 0f8166620e
commit de03bef226
4 changed files with 18 additions and 7 deletions

View File

@@ -36,9 +36,9 @@ class MouseInteractiveViewer extends StatefulWidget {
this.transformationController,
this.alignment,
this.trackpadScrollCausesScale = false,
required this.childKey,
required this.child,
required this.onTranslate,
}) : assert(minScale > 0),
assert(interactionEndFrictionCoefficient > 0),
assert(maxScale > 0),
@@ -66,6 +66,7 @@ class MouseInteractiveViewer extends StatefulWidget {
final GestureScaleUpdateCallback? onInteractionUpdate;
final TransformationController? transformationController;
final GlobalKey childKey;
final VoidCallback onTranslate;
static const double _kDrag = 0.0000135;
@@ -641,6 +642,8 @@ class _MouseInteractiveViewerState extends State<MouseInteractiveViewer>
_transformer.value,
newFocalPointScene - focalPointScene,
);
widget.onTranslate();
}
void _handleInertiaAnimation() {