Well, finally, I returned to my problem and got some progress: https://github.com/andyzee/jquery-resizable-rotation-patch I decided not to use the rotation matrix right now (although it really works), but to switch handlers
function switchAxis(axis, angle) { while(angle >= 360) angle = 360-angle; while(angle < 0) angle = 360+angle; var axisArray = ["n", "ne", "e", "se", "s", "sw", "w", "nw"]; var octant = Math.round(angle/45); // 0 .. 7 var index = 0; if ( [].indexOf ) { index = axisArray.indexOf(axis); } else { for(var i=0; i<axisArray.length; i++) { if (axisArray[i] === axis) index = i; } } var newAxisIndex = (index + octant) % 8; return axisArray[newAxisIndex]; }
I will definitely continue my search and probably write my own solution.
source share