{"action":"created","issue":{"url":"https://api.github.com/repos/godswearhats/jquery-ui-rotatable/issues/11","labels_url":"https://api.github.com/repos/godswearhats/jquery-ui-rotatable/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/godswearhats/jquery-ui-rotatable/issues/11/comments","events_url":"https://api.github.com/repos/godswearhats/jquery-ui-rotatable/issues/11/events","html_url":"https://github.com/godswearhats/jquery-ui-rotatable/issues/11","id":38337019,"number":11,"title":"Retrieve current rotation","user":{"login":"amenadiel","id":238439,"avatar_url":"https://avatars.githubusercontent.com/u/238439?v=3","gravatar_id":"","url":"https://api.github.com/users/amenadiel","html_url":"https://github.com/amenadiel","followers_url":"https://api.github.com/users/amenadiel/followers","following_url":"https://api.github.com/users/amenadiel/following{/other_user}","gists_url":"https://api.github.com/users/amenadiel/gists{/gist_id}","starred_url":"https://api.github.com/users/amenadiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amenadiel/subscriptions","organizations_url":"https://api.github.com/users/amenadiel/orgs","repos_url":"https://api.github.com/users/amenadiel/repos","events_url":"https://api.github.com/users/amenadiel/events{/privacy}","received_events_url":"https://api.github.com/users/amenadiel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-07-21T19:39:41Z","updated_at":"2015-01-13T08:24:20Z","closed_at":null,"body":"After rotating an object I need to retrieve the current angle so I can persist it in my backend.\r\n\r\nAt this moment, I'm doing this\r\n\r\n```js\r\njQuery(div).rotatable({\r\n\t\tstop: function (element) {\r\n\t\t\tvar rotation = jQuery(element.target).data('ui-rotatable').elementCurrentAngle;\r\n\t\t\tconsole.log('Rotatable stopped', rotation);\r\n\t\t}\r\n\t});\r\n```\r\n\r\nit works fine, but somehow it feels hacky. Is there a canonical way to get the widget attributes in a given moment?"},"comment":{"url":"https://api.github.com/repos/godswearhats/jquery-ui-rotatable/issues/comments/69710207","html_url":"https://github.com/godswearhats/jquery-ui-rotatable/issues/11#issuecomment-69710207","issue_url":"https://api.github.com/repos/godswearhats/jquery-ui-rotatable/issues/11","id":69710207,"user":{"login":"yaramayer","id":723414,"avatar_url":"https://avatars.githubusercontent.com/u/723414?v=3","gravatar_id":"","url":"https://api.github.com/users/yaramayer","html_url":"https://github.com/yaramayer","followers_url":"https://api.github.com/users/yaramayer/followers","following_url":"https://api.github.com/users/yaramayer/following{/other_user}","gists_url":"https://api.github.com/users/yaramayer/gists{/gist_id}","starred_url":"https://api.github.com/users/yaramayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaramayer/subscriptions","organizations_url":"https://api.github.com/users/yaramayer/orgs","repos_url":"https://api.github.com/users/yaramayer/repos","events_url":"https://api.github.com/users/yaramayer/events{/privacy}","received_events_url":"https://api.github.com/users/yaramayer/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T08:24:20Z","updated_at":"2015-01-13T08:24:20Z","body":"@godswearhats\r\nSpeaking for myself, I worked with the value of elementStopAngle for a couple months and there was never an issue with the output. Judging from the code, that means that elementCurrentAngle should also be correct.\r\nRegarding access, I only used jQuery('someelement').data('rotatable').elementCurrentAngle for testing purposes (it always worked) - I hooked into the stop events in my model and there used the ui.angle.x param.\r\nBecause of that, I didn't feel the need to change or add to the code. But maybe I missed the point/problem entirely."}}