How to add class to package in draw.io

draw.io

I'm making class diagram in draw.io.

I add a package and a class to the paper.
How do I add the class to the package? (just plain putting it there on the package seems silly and what if I wanted to move the whole package?)

Aditional question: is there any way to move the name of the package away from the center of the package?

Best Answer

I figured out that you can do this by doing voodoo magic. Select the package and then click on the "Text" tab, next make sure the position is to the left and then select the Arrow with the line over (it's highlighted in the image), next set the top spacing (I made mine -5pt). This is the best quick way of doing this without having to do so much work. Copy and paste also works for multiple packages. You can also adjust the size of the space by selecting the orange circle (in the image below). I hope this helps someone.

Text properties in draw.io Package diagram