I'm having trouble getting an element to rotate relative to its position after being dragged.
I have a slider which goes from 0-360 and when the value is changed the following is called:
var origTransform = activeElement.transform().local
if( origTransform ) {
var rSplit = origTransform.split('r');
if( rSplit.length !== 0 ) {
origTransform = rSplit[0] + "r" + degrease + ",20,20"
}
} else {
origTransform = "r" + degrease + ",20,20"
}
activeElement.attr({
transform: origTransform
});
Anyone see where I'm going wrong?
thanks to @ian for getting me there:
http://jsfiddle.net/4eL3gstp/17/