I have 4 images connected to each other which form a big image. My task is to rotate the big image to a certain angle that is entered by the user. Now, to rotate the full image, I need to rotate the smaller connected images and then translate them accordingly so that the full images seems to be rotated.
But can't get the translation coordinates properly. Please help me out with that. Also, if there is any other way to do this, you can tell me that as well.
The code can be found here - https://jsfiddle.net/e4qp6btx/1/
document.getElementById("img1").style.transform = "translate(" + x + "px," + y + "px) rotate(" + angle + "deg)" ;
Edit - I actually want to rotate and translate individual images rather than rotating the whole container.