     frame.size = CGSize(width: textBounds.width + padding * 2 + edgeInsets.horizontal, height: textBounds.height + padding * 2 + edgeInsets.vertical + arrowSize.height)
     var x = from.origin.x + from.width / 2 - frame.width / 2
     if x < 0 { x = edgeMargin }
-    if constrainInContainerView && (x + frame.width > containerView.bounds.width) { x = containerView.bounds.width - frame.width - edgeMargin }
+    if constrainInContainerView && (x + frame.width > containerView.bounds.width) {
+      x = containerView.bounds.width - frame.width - edgeMargin
+    }
     
     if direction == .down {
       frame.origin = CGPoint(x: x, y: from.origin.y + from.height + offset)

    frame.origin.x += bubbleOffset
    frame.size = CGSize(width: frame.width + borderWidth * 2, height: frame.height + borderWidth * 2)
    
    return (frame, arrowPosition)
  }
  

    }
    
    setNeedsDisplay()
    
    if tapGestureRecognizer == nil {
      tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(PopTip.handleTap(_:)))
      tapGestureRecognizer?.cancelsTouchesInView = false
      self.addGestureRecognizer(tapGestureRecognizer!)
    }
    if shouldDismissOnTapOutside && tapRemoveGestureRecognizer == nil {
      tapRemoveGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(PopTip.handleTapOutside(_:)))
    }
    if shouldDismissOnSwipeOutside && swipeGestureRecognizer == nil {
      swipeGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(PopTip.handleSwipeOutside(_:)))
