{"action":"created","issue":{"url":"https://api.github.com/repos/d3/d3-zoom/issues/34","repository_url":"https://api.github.com/repos/d3/d3-zoom","labels_url":"https://api.github.com/repos/d3/d3-zoom/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/d3/d3-zoom/issues/34/comments","events_url":"https://api.github.com/repos/d3/d3-zoom/issues/34/events","html_url":"https://github.com/d3/d3-zoom/issues/34","id":161014420,"number":34,"title":"zoomTransform not retrieving value set via zoom.transform","user":{"login":"curran","id":68416,"avatar_url":"https://avatars.githubusercontent.com/u/68416?v=3","gravatar_id":"","url":"https://api.github.com/users/curran","html_url":"https://github.com/curran","followers_url":"https://api.github.com/users/curran/followers","following_url":"https://api.github.com/users/curran/following{/other_user}","gists_url":"https://api.github.com/users/curran/gists{/gist_id}","starred_url":"https://api.github.com/users/curran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curran/subscriptions","organizations_url":"https://api.github.com/users/curran/orgs","repos_url":"https://api.github.com/users/curran/repos","events_url":"https://api.github.com/users/curran/events{/privacy}","received_events_url":"https://api.github.com/users/curran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-18T08:44:40Z","updated_at":"2016-06-18T16:31:47Z","closed_at":"2016-06-18T15:29:19Z","body":"From the documentation, it seems that `zoom.transform` should be used to set the transform value on a selection, like this:\r\n\r\n```js\r\nvar transform = d3.zoomIdentity\r\n  .scale(2)\r\n  .translate(3, 4);\r\n\r\nvar zoom = d3.zoom();\r\n\r\nvar svg = d3.select(\"body\").append(\"svg\");\r\n\r\nsvg.call(zoom.transform, transform);\r\n```\r\n\r\nAlso from the documentation, it seems that `zoomTransform` should be used to retrieve the value set via `zoom.transform`, like this:\r\n\r\n```js\r\nvar retrievedTransform = d3.zoomTransform(svg);\r\n```\r\n\r\nHowever, the retrieved transform ends up as the identity transform, rather than the transform previously set.\r\n\r\n```js\r\n// Prints \"transform = translate(6,8) scale(2)\", as expected.\r\nconsole.log(\"transform = \" + transform);\r\n\r\n// Prints \"retrievedTransform = translate(0,0) scale(1)\".\r\n// This is not expected, it should be the \"translate(6,8) scale(2)\".\r\nconsole.log(\"retrievedTransform = \" + retrievedTransform);\r\n```\r\n\r\nHere's a [block that reproduces the behavior](http://bl.ocks.org/curran/e29da537fa106f79a4e9894fff4b1606).\r\n\r\nAm I misunderstanding the API or might this be a bug?"},"comment":{"url":"https://api.github.com/repos/d3/d3-zoom/issues/comments/226951600","html_url":"https://github.com/d3/d3-zoom/issues/34#issuecomment-226951600","issue_url":"https://api.github.com/repos/d3/d3-zoom/issues/34","id":226951600,"user":{"login":"curran","id":68416,"avatar_url":"https://avatars.githubusercontent.com/u/68416?v=3","gravatar_id":"","url":"https://api.github.com/users/curran","html_url":"https://github.com/curran","followers_url":"https://api.github.com/users/curran/followers","following_url":"https://api.github.com/users/curran/following{/other_user}","gists_url":"https://api.github.com/users/curran/gists{/gist_id}","starred_url":"https://api.github.com/users/curran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curran/subscriptions","organizations_url":"https://api.github.com/users/curran/orgs","repos_url":"https://api.github.com/users/curran/repos","events_url":"https://api.github.com/users/curran/events{/privacy}","received_events_url":"https://api.github.com/users/curran/received_events","type":"User","site_admin":false},"created_at":"2016-06-18T16:31:47Z","updated_at":"2016-06-18T16:31:47Z","body":"Ahh got it. Thank you."}}
{"actor":{"display_login":"curran"}}