{"action":"closed","issue":{"url":"https://api.github.com/repos/ariutta/svg-pan-zoom/issues/111","labels_url":"https://api.github.com/repos/ariutta/svg-pan-zoom/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/ariutta/svg-pan-zoom/issues/111/comments","events_url":"https://api.github.com/repos/ariutta/svg-pan-zoom/issues/111/events","html_url":"https://github.com/ariutta/svg-pan-zoom/issues/111","id":75950769,"number":111,"title":".fit() and .center() not working for certain SVGs","user":{"login":"oller","id":1219831,"avatar_url":"https://avatars.githubusercontent.com/u/1219831?v=3","gravatar_id":"","url":"https://api.github.com/users/oller","html_url":"https://github.com/oller","followers_url":"https://api.github.com/users/oller/followers","following_url":"https://api.github.com/users/oller/following{/other_user}","gists_url":"https://api.github.com/users/oller/gists{/gist_id}","starred_url":"https://api.github.com/users/oller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oller/subscriptions","organizations_url":"https://api.github.com/users/oller/orgs","repos_url":"https://api.github.com/users/oller/repos","events_url":"https://api.github.com/users/oller/events{/privacy}","received_events_url":"https://api.github.com/users/oller/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ariutta/svg-pan-zoom/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ariutta/svg-pan-zoom/labels/closed%20in%20dev","name":"closed in dev","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-05-13T11:23:48Z","updated_at":"2015-06-30T08:18:23Z","closed_at":"2015-06-30T08:18:23Z","body":"First off, fantastic library! :+1: \r\n\r\nI'm having trouble getting `.fit()` and `.center()` to work for some svg files I'm working on.  These worked when the viewBox was declared, but this causes issues in IE as discussed in Issue https://github.com/ariutta/svg-pan-zoom/issues/21\r\n\r\nAs a result, I've ripped out the viewBox attribute in order to fix this, but that causes this problem with these functions.  I'm not sure if this is related some existing transform's in the svgs.\r\n\r\nI've put a fiddle where you can see this problem.\r\n\r\nhttp://jsfiddle.net/167usffr/96/\r\n\r\nIf you inspect the DOM, you'll see the `<svg>` and `<g class=\"svg-pan-zoom_viewport\">` are significantly misaligned.\r\n\r\nThis doesn't occur with the tiger svg, so I'm aware the problem must originate from something in the SVG itself, I'm just not sure which aspect is causing the problem and how I could remedy this, via either some additional initialisation code, or amending the SVG file.\r\n\r\nThanks!"}}