Исправлен рендеринг voice blob — убран shapeLayer.bounds, уменьшен размер до 56pt
This commit is contained in:
@@ -246,7 +246,11 @@ private final class BlobLayer {
|
||||
|
||||
func updateBounds(_ size: CGSize) {
|
||||
boundsSize = size
|
||||
shapeLayer.bounds = CGRect(origin: .zero, size: size)
|
||||
// DON'T set shapeLayer.bounds — leave at default (0,0,0,0).
|
||||
// Telegram BlobNode.layout(): shapeLayer has zero-sized bounds + position at center.
|
||||
// With zero bounds, local (0,0) maps to the position point = view center.
|
||||
// Blob paths are centered at (0,0), so they render at the view's center. Correct!
|
||||
// Setting bounds to (0,0,68,68) shifts local (0,0) to the view's top-left. Wrong!
|
||||
shapeLayer.position = CGPoint(x: size.width / 2, y: size.height / 2)
|
||||
|
||||
if isCircle {
|
||||
|
||||
Reference in New Issue
Block a user