Исправлен рендеринг voice blob — убран shapeLayer.bounds, уменьшен размер до 56pt

This commit is contained in:
2026-04-13 00:19:07 +05:00
parent 08a1da64a8
commit dd80c7d7e3
5 changed files with 349 additions and 162 deletions

View File

@@ -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 {