How to rotate a dojox gfx at a new position?
The shape is moveable and has to be rotated and scaled at the new position. For demonstration i have used the Butterly Demo from dojox gfx. See this example at jsfiddle for the moveable butterfly.
How is it possible to rotate and scale the shape at the new position and the new center?
Thanks in advance,
mbecker
I forked your jsFiddle (http://jsfiddle.net/phusick/ta65D/) and added two instances of
dijit/form/NumberSpinner
(translateX & translateY) to move the butterfly thanks to modifiedupdateMatrix
function:EDIT: To add mouse DnD support add the following code to the aforementioned:
Of course, you do not have to use
NumberSpinner
, but since I put it there before it gives you a nice feedback what is going on behind the scenes. See it at jsFiddle: http://jsfiddle.net/phusick/ta65D/.