I am doing a webapp where you can place elements in a grid, move them and rotate.
I ran into the problem of rotating elements if the width is an odd number and the height is even and vice versa.
When rotating around the center of an element, the new coordinates for the element end in half.


Rotation happens when im adds a class to an element using jQuery and the actual rotation is done using CSS.
I need the element to align with the grid after an "erroneous" rotation. How can I achieve this?
source
share