I'm trying to get the offset of an element within the bounds of another element. As I move the element around in the box, the transform is all over the place, calculating the relative offset to the last click. The one value that looks like the one that I want is the transform of the moveablve-control-box, as it contains the proper offset. When I assign target.style.transform = transform in my onDrag function, it does not take on this value from the moveable-control-box. Where is this value coming from? How can I easily get the transform from the moveable-control-box as my final placement?
I'm trying to get the offset of an element within the bounds of another element. As I move the element around in the box, the transform is all over the place, calculating the relative offset to the last click. The one value that looks like the one that I want is the transform of the moveablve-control-box, as it contains the proper offset. When I assign target.style.transform = transform in my onDrag function, it does not take on this value from the moveable-control-box. Where is this value coming from? How can I easily get the transform from the moveable-control-box as my final placement?