Fix detector center coordinates

Use view-local coordinates for the detector center because
its drawing, touch handling, and crop ROI math all operate
in the view's own coordinate space.

This avoids offset crop overlays when the view is not laid
out at the parent's origin.
This commit is contained in:
Markus Fisch
2026-06-01 23:23:30 +02:00
parent 13eabaee19
commit cd30a86c69
@@ -247,8 +247,8 @@ class DetectorView : View {
viewWidth = right - left
viewHeight = bottom - top
center.set(
left + (viewWidth / 2),
top + (viewHeight / 2)
viewWidth / 2,
viewHeight / 2
)
minY = padding * 2
maxY = viewHeight - minY