Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG in Preview Zoom for image #696

Closed
edwinhuish opened this issue Jun 28, 2016 · 4 comments
Closed

BUG in Preview Zoom for image #696

edwinhuish opened this issue Jun 28, 2016 · 4 comments

Comments

@edwinhuish
Copy link

edwinhuish commented Jun 28, 2016

Image out of proportion in preview zoom.

I have read the code, change as blew, and it can resolve the BUG.

defaultPreviewZoomSettings = {

        image: {width: "auto", height: "auto", 'max-width': "100%",'max-height': "100%"},
        html: {width: "100%", height: "100%", 'min-height': "480px"},
        text: {width: "100%", height: "100%", 'min-height': "480px"},
        video: {width: "auto", height: "100%", 'max-width': "100%"},
        audio: {width: "100%", height: "30px"},
        flash: {width: "auto", height: "480px"},
        object: {width: "auto", height: "100%", 'min-height': "480px"},
        pdf: {width: "100%", height: "100%", 'min-height': "480px"},
        other: {width: "auto", height: "100%", 'min-height': "480px"}
    };
@kartik-v
Copy link
Owner

These are defaults. You can set your own image preview zoom settings via the property previewZoomSettings

@carter-thaxton
Copy link

Within 5 minutes of trying out bootstrap-fileinput, I ran into this image preview distortion issue.
It's frustrating to have to find this issue and override the defaults in order to customize the images to appear correctly.

I'm not sure of any application where the fixed defaults provided by @edwinhuish wouldn't be more appropriate. Are you worried about breaking compatibility? He went out of his way to improve this plugin in a very reasonable way. My vote is to accept this patch.

@kartik-v kartik-v reopened this Oct 22, 2016
@kartik-v
Copy link
Owner

Can you please share a JS Fiddle to test that this works for most scenarios? Default Settings should be set to one which works for most scenarios.

Settings can be individually configured as mentioned - as each user will anyway have his/her dimensions of images to upload and it will need to be styled as per their UX design and containers.

I have reopened this issue - so that this can be tested and improved if needed.

@kartik-v
Copy link
Owner

Resolved via 5edbd4d and documented in the change log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants