{"action":"opened","issue":{"url":"https://api.github.com/repos/vilterp/elm-diagrams/issues/29","labels_url":"https://api.github.com/repos/vilterp/elm-diagrams/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/vilterp/elm-diagrams/issues/29/comments","events_url":"https://api.github.com/repos/vilterp/elm-diagrams/issues/29/events","html_url":"https://github.com/vilterp/elm-diagrams/issues/29","id":64652965,"number":29,"title":"Wrong coords returned","user":{"login":"rintcius","id":888781,"avatar_url":"https://avatars.githubusercontent.com/u/888781?v=3","gravatar_id":"","url":"https://api.github.com/users/rintcius","html_url":"https://github.com/rintcius","followers_url":"https://api.github.com/users/rintcius/followers","following_url":"https://api.github.com/users/rintcius/following{/other_user}","gists_url":"https://api.github.com/users/rintcius/gists{/gist_id}","starred_url":"https://api.github.com/users/rintcius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rintcius/subscriptions","organizations_url":"https://api.github.com/users/rintcius/orgs","repos_url":"https://api.github.com/users/rintcius/repos","events_url":"https://api.github.com/users/rintcius/events{/privacy}","received_events_url":"https://api.github.com/users/rintcius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-26T23:03:38Z","updated_at":"2015-03-26T23:03:38Z","closed_at":null,"body":"It looks like the code below returns the wrong coords. \r\n\r\n```\r\nmodule GetCoordsTest where\r\n\r\nimport Color\r\nimport Debug\r\nimport Diagrams (..)\r\nimport Graphics.Collage as C\r\nimport Signal\r\nimport Window\r\n\r\ntype BoxTag = OuterBox | InnerBox\r\n\r\ninnerBox     = (tag InnerBox <| rect 60 30 (justFill <| C.Solid Color.blue)) |> rotate 30 |> move (-50,60)\r\nouterBox     = tag OuterBox <| rect 100 120 (justFill <| C.Solid Color.yellow)\r\n\r\ntest : (Int,Int) -> Diagram BoxTag\r\ntest (w, h) =\r\n    let dia = innerBox `atop` outerBox\r\n        dummy = Debug.log \"coords\" <| getCoords dia [InnerBox]\r\n    in dia\r\n\r\nmain = Signal.map (\\size -> fullWindowView size (test size)) Window.dimensions\r\n```\r\n\r\nIt logs: `coords: Just (51.569324951192506,58.656668197898135)`\r\n\r\nIf you swap the `rotate` and `move`, i.e. like this (which shows the same diagram)\r\n```\r\ninnerBox     = (tag InnerBox <| rect 60 30 (justFill <| C.Solid Color.blue)) |> move (-50,60) |> rotate 30 \r\n```\r\n then the expected coords are logged: `coords: Just (-50,60)`\r\n\r\nMaybe it is more subtle than I understand it, but I'd think that the result should be the same, since the `move` and `rotate` are in both cases outside the `InnerBox` tag but part of the `innerBox` definition."}}