In my current code, I am setting the rotational angle of an element using the following:
$('#1-link-2')
.css('height', length)
.css('-webkit-transform', 'rotate(' + angle + 'deg)')
.css('-moz-transform', 'rotate(' + angle + 'deg)')
.css('-o-transform', 'rotate(' + angle + 'deg)')
.css('-ms-transform', 'rotate(' + angle + 'deg)')
.css('transform', 'rotate(' + angle + 'deg)');
The angle is calculated dynamically based on the mouse position.
Now, I want to retrieve the angle. I attempted this:
var angle= $("#1-link-2").css('-webkit-transform');
$('#node-title').html(angle); //displaying it on the screen
The output I received was:
matrix(0.5425908601788315, -0.839997118120292, 0.839997118120292, 0.5425908601788315, 0, 0)
How do I extract the angle in degrees from this?