{"action":"opened","issue":{"url":"https://api.github.com/repos/timmywil/jquery.panzoom/issues/231","repository_url":"https://api.github.com/repos/timmywil/jquery.panzoom","labels_url":"https://api.github.com/repos/timmywil/jquery.panzoom/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/timmywil/jquery.panzoom/issues/231/comments","events_url":"https://api.github.com/repos/timmywil/jquery.panzoom/issues/231/events","html_url":"https://github.com/timmywil/jquery.panzoom/issues/231","id":140633968,"number":231,"title":"Making the panzoom element zoom outside of its parent","user":{"login":"Moghul","id":17046245,"avatar_url":"https://avatars.githubusercontent.com/u/17046245?v=3","gravatar_id":"","url":"https://api.github.com/users/Moghul","html_url":"https://github.com/Moghul","followers_url":"https://api.github.com/users/Moghul/followers","following_url":"https://api.github.com/users/Moghul/following{/other_user}","gists_url":"https://api.github.com/users/Moghul/gists{/gist_id}","starred_url":"https://api.github.com/users/Moghul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Moghul/subscriptions","organizations_url":"https://api.github.com/users/Moghul/orgs","repos_url":"https://api.github.com/users/Moghul/repos","events_url":"https://api.github.com/users/Moghul/events{/privacy}","received_events_url":"https://api.github.com/users/Moghul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-14T10:30:06Z","updated_at":"2016-03-14T10:30:06Z","closed_at":null,"body":"I was having an issue with centering the popped out element at the center of the screen. The available methods online included changing the position to absolute (which completely broke the zoom) or using a margin-top value (which made the image zoom far below the point in between the fingers).\r\n\r\nI went for a different solution where I created a div container for the panzoomed image and the container itself was centered on the screen. This worked well with contain-invert, except the image would not zoom in such a manner that it would be able to zoom to more than the size of its parent (it would zoom but stay in the confines of its parent. Container size is set to 1px by 1px so it is definitely smaller than the panzoomed element).\r\n\r\nThe issue, I found, was that the container, at runtime, was assigned a style of \"overflow:hidden\". I fixed my issue by changing line 886 in jquery.panzoom.js to overflow:'visible'.\r\n\r\nI am unsure whether the initial behaviour was intended but that particular line will change it to what I want it to do.\r\n\r\nHowever, the creator should consider that developers might want their zoomable object in the center of the screen (by that I mean the initial position) and note that it is unclear to me how to do this from the documentation (if there is a way)."}}