     }
     
     if constrainInContainerView {
-      // Make sure that the bubble doesn't leaves the boundaries of the view
+      // Make sure that the bubble doesn't leave the boundaries of the view
       let leftSpace = frame.origin.x - containerView.frame.origin.x
       let rightSpace = containerView.frame.width - leftSpace - frame.width
       

    }
    
    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(_:)))

    if y < 0 { y = edgeMargin }
    // Make sure we stay in the view limits except if it has scroll then it must be inside contentview limits not the view
    if let containerScrollView = containerView as? UIScrollView {
      if y + frame.height > containerScrollView.contentSize.height {
        y = containerScrollView.contentSize.height - frame.height - edgeMargin
      }
    } else {
      if y + frame.height > containerView.bounds.height && constrainInContainerView {
        y = containerView.bounds.height - frame.height - edgeMargin
      }
    }
    frame.origin = CGPoint(x: x, y: y)
    
