fix(analysis): appliquer la transformation globale sur le GestureDetector pour restaurer le drag-and-drop
This commit is contained in:
@@ -403,6 +403,13 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
maxScale: 10.0,
|
||||
boundaryMargin: const EdgeInsets.all(double.infinity),
|
||||
panEnabled: _movingShotId == null,
|
||||
child: Transform(
|
||||
// CORRECTION GÉOMÉTRIQUE : On déplace le Transform ICI pour englober le GestureDetector et le Stack d'un coup !
|
||||
transform: Matrix4.identity()
|
||||
..setTranslationRaw(widget.cropOffset?.dx ?? 0.0, widget.cropOffset?.dy ?? 0.0, 0.0)
|
||||
..scale(1.0, 1.0)
|
||||
..rotateZ((provider.cropRotation) * (math.pi / 180)),
|
||||
alignment: Alignment.center,
|
||||
child: GestureDetector(
|
||||
onDoubleTapDown: (TapDownDetails details) {
|
||||
final RenderBox? box = _imageKey.currentContext?.findRenderObject() as RenderBox?;
|
||||
@@ -487,18 +494,10 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
// FIX CRITIQUE PLOTTING : L'image de fond doit appliquer exactement le même angle de rotation qu'en calibration !
|
||||
Transform(
|
||||
transform: Matrix4.identity()
|
||||
..setTranslationRaw(widget.cropOffset?.dx ?? 0.0, widget.cropOffset?.dy ?? 0.0, 0.0)
|
||||
..scale(1.0, 1.0)
|
||||
..rotateZ((provider.cropRotation) * (math.pi / 180)),
|
||||
alignment: Alignment.center,
|
||||
child: Image.file(
|
||||
Image.file(
|
||||
File(provider.imagePath!),
|
||||
key: _imageKey,
|
||||
fit: BoxFit.contain, // Remplace BoxFit.fill pour s'aligner sur la Calibration
|
||||
),
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
TargetOverlay(
|
||||
targetCenterX: provider.targetCenterX,
|
||||
@@ -514,9 +513,9 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildActionButtons(BuildContext context, AnalysisProvider provider) {
|
||||
return const Column(children: [Row(children: [])]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user