         let centerPointX = leftFrame.midX + (rightFrame.midX - leftFrame.midX) * percent
         let offsetX = centerPointX - bounds.width / 2
         let normaizedOffsetX = min(max(minContentOffsetX, offsetX), maxContentOffsetX)
-        focusView.center = CGPoint(x: centerPointX, y: centerY)
+        focusView.center = CGPoint(x: centerPointX, y: center.y)
         
         setContentOffset(CGPoint(x: normaizedOffsetX, y:0), animated: animated)
         focusView.selectedIndex = index

            cell.frame.origin = CGPoint(x: leftEdge, y: 0)
            cell.frame.size = CGSize(width: widths[cell.index], height: containerView.bounds.height)
        }
    }
    
    @discardableResult

    
    public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
        if keyPath == #keyPath(UIView.bounds), let newFrame = change?[.newKey] as? CGRect, let oldFrame = change?[.oldKey] as? CGRect, newFrame.height != oldFrame.height {
            adjustComponentHeights(from: newFrame.height)
        }
    }
    
