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,
|
maxScale: 10.0,
|
||||||
boundaryMargin: const EdgeInsets.all(double.infinity),
|
boundaryMargin: const EdgeInsets.all(double.infinity),
|
||||||
panEnabled: _movingShotId == null,
|
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(
|
child: GestureDetector(
|
||||||
onDoubleTapDown: (TapDownDetails details) {
|
onDoubleTapDown: (TapDownDetails details) {
|
||||||
final RenderBox? box = _imageKey.currentContext?.findRenderObject() as RenderBox?;
|
final RenderBox? box = _imageKey.currentContext?.findRenderObject() as RenderBox?;
|
||||||
@@ -487,18 +494,10 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
|||||||
},
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
// FIX CRITIQUE PLOTTING : L'image de fond doit appliquer exactement le même angle de rotation qu'en calibration !
|
Image.file(
|
||||||
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(
|
|
||||||
File(provider.imagePath!),
|
File(provider.imagePath!),
|
||||||
key: _imageKey,
|
key: _imageKey,
|
||||||
fit: BoxFit.contain, // Remplace BoxFit.fill pour s'aligner sur la Calibration
|
fit: BoxFit.contain,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
TargetOverlay(
|
TargetOverlay(
|
||||||
targetCenterX: provider.targetCenterX,
|
targetCenterX: provider.targetCenterX,
|
||||||
@@ -514,9 +513,9 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildActionButtons(BuildContext context, AnalysisProvider provider) {
|
Widget _buildActionButtons(BuildContext context, AnalysisProvider provider) {
|
||||||
return const Column(children: [Row(children: [])]);
|
return const Column(children: [Row(children: [])]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user