{"action":"created","issue":{"url":"https://api.github.com/repos/cbopp-art/lightcase/issues/74","repository_url":"https://api.github.com/repos/cbopp-art/lightcase","labels_url":"https://api.github.com/repos/cbopp-art/lightcase/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/cbopp-art/lightcase/issues/74/comments","events_url":"https://api.github.com/repos/cbopp-art/lightcase/issues/74/events","html_url":"https://github.com/cbopp-art/lightcase/issues/74","id":163947833,"number":74,"title":"Fit fluid image in inline window?","user":{"login":"nickpish","id":4361220,"avatar_url":"https://avatars.githubusercontent.com/u/4361220?v=3","gravatar_id":"","url":"https://api.github.com/users/nickpish","html_url":"https://github.com/nickpish","followers_url":"https://api.github.com/users/nickpish/followers","following_url":"https://api.github.com/users/nickpish/following{/other_user}","gists_url":"https://api.github.com/users/nickpish/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpish/subscriptions","organizations_url":"https://api.github.com/users/nickpish/orgs","repos_url":"https://api.github.com/users/nickpish/repos","events_url":"https://api.github.com/users/nickpish/events{/privacy}","received_events_url":"https://api.github.com/users/nickpish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-07-05T21:11:01Z","updated_at":"2016-07-11T04:26:12Z","closed_at":null,"body":"Hi, first off, I want to say thank you for such a phenomenal plugin-- I reviewed many (many) lightbox plugins for use in my portfolio, and this one is far and away the best I've encountered.\r\n\r\nAs for my question-- which is admittedly more CSS-related-- I'm using Lightcase for displaying inline elements, and I'm trying to get large images within to scale proportionally to fit the window. I'm using `max-width:100%` and `max-height:100%` on images contained within the boxes, and while the width scales properly, taller images do not fit the window height, and therefore cause a scrollbar to appear if the height exceeds that of the window. I have tried every method I can think of, including using the `object-fit` property, but to no avail. If I explicitly set a height to the inline window container, the image will scale properly, but I want it to be responsive and just fit the size as defined in the Lightcase settings (i.e. `maxWidth` and `maxHeight`).\r\n\r\nAny ideas here on how to get the image to properly fit the height of the popup window, without explicitly defining a height for the container? Thanks very much for any assistance here."},"comment":{"url":"https://api.github.com/repos/cbopp-art/lightcase/issues/comments/231639615","html_url":"https://github.com/cbopp-art/lightcase/issues/74#issuecomment-231639615","issue_url":"https://api.github.com/repos/cbopp-art/lightcase/issues/74","id":231639615,"user":{"login":"nickpish","id":4361220,"avatar_url":"https://avatars.githubusercontent.com/u/4361220?v=3","gravatar_id":"","url":"https://api.github.com/users/nickpish","html_url":"https://github.com/nickpish","followers_url":"https://api.github.com/users/nickpish/followers","following_url":"https://api.github.com/users/nickpish/following{/other_user}","gists_url":"https://api.github.com/users/nickpish/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpish/subscriptions","organizations_url":"https://api.github.com/users/nickpish/orgs","repos_url":"https://api.github.com/users/nickpish/repos","events_url":"https://api.github.com/users/nickpish/events{/privacy}","received_events_url":"https://api.github.com/users/nickpish/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T04:26:12Z","updated_at":"2016-07-11T04:26:12Z","body":"Hi @cbopp-art yes, that was the final necessary piece-- I've updated [the fiddle](https://jsfiddle.net/nickpish/7qudm0my/) for future reference and here is the working initialization (please let me know if you see any potential issues with the syntax.) Thanks again, this is great!\r\n\r\n```\r\njQuery(document).ready(function($) {\r\n  $('a[data-rel^=lightcase]').lightcase({\r\n        onFinish : {\r\n            custom: function() {\r\n                var caption = $(this).find('.caption');\r\n                if (caption.length) {\r\n                    lightcase.get('caption').html(caption.html());\r\n                    $('#lightcase-caption').show();\r\n                } \r\n                lightcase.resize();\r\n            }\r\n        }\r\n    });\r\n});\r\n```"}}
{"actor":{"display_login":"nickpish"}}