That code snippet is what we are using in the API to rotate the shape. Once it's done, you need to call graphic.setGeometry() to make it permanent.There are a lot math going on, but still gfx library can do a lot heavy lifting part.
Unfortunately, we didn't make it as an API.You need to check dojox/gfx/matrix library. Here is the short but essential code: var tx = matrix.rotategAt(angle, anchor); graphic.getDojoShape().setTransform(tx);
var tx = matrix.rotategAt(angle, anchor); graphic.getDojoShape().setTransform(tx);
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.