Is there a way to have box take into account placed items?

#{

    let a = box({
      rect()
      place(top + left, dx: -10pt, circle(radius: 5pt, fill: black))
    }, fill: yellow)
    #a
}

image

the resultant circle is placed outside the bounds of the box.
I was wondering if there was a way for the box to be able to account for it.

Thank you for the help!

Hello @Kevin_Lee, I have changed your topic’s category to Questions, don’t hesitate to read How to post in the Questions category!

Hi!
I’m not quite sure what you mean with “account for it”, but the circle is outside the box, because you placed it outside the box, by setting the dy parameter.

Without this, it’s inside the box

#{

    let a = box({
      rect()
      place(top + left, circle(radius: 5pt, fill: black))
    }, fill: yellow)
    a
}

IMG_4693