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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user