Focus Tap Indicator Not Centered on Tap Location
achi113s opened this issue · comments
Giorgio Latour commented
CameraPreview.swift: The circle that appears when you tap to focus does not appear at the location of the tap. Instead it appears slightly off center due to the origin of the circle being at the top left corner. Proposed solution is to just offset the circle in x and y by its radius. Should just modify the focusView's CGRect to this:
let focusCircleDiam: CGFloat = 50
let shiftedLayerPoint = CGPoint(
x: layerPoint.x - (focusCircleDiam / 2),
y: layerPoint.y - (focusCircleDiam / 2))
self.focusView.layer.frame = CGRect(origin: shiftedLayerPoint, size: CGSize(width: focusCircleDiam, height: focusCircleDiam))
Rolando Rodríguez commented
Thanks for pointing this out, I'll take a look.
Rolando Rodríguez commented
Thanks, this fixes the issue will update main branch.