I've come back to finish this project, but I've been having trouble figuring out the transformation I need. This basically encapsulates what I'm doing:
https://jsfiddle.net/qw2odmLb/
The idea is to track the child's position relative to the parent while dragging or while manually inputting coordinates and rotations. All the relevant logic is in the update() function. However, it doesn't work properly in the face of rotations on the parent, so I'm clearly missing something. To see the issue, do the following:
1. Set the parent angle to 30. Crafty correctly rotates.
2. Set the child x or y to 1 and back to zero. My update function places child incorrectly.
Changing x and y of child moves it along the correct vector so the angle calculation I have is definitely correct, but the positions are way off. I've specified the rotation origin as the center, so I've tried to rotate the child's top left corner around the parent's midpoint, which should be (parent._x+parent._w/2, parent._y + parent._h/2) correct? This comes out totally wrong though.
I would very much appreciate if you could spot what I've done wrong here, as I've been banging my head against this for hours.