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

img width percentage doesn't work #12

Open
hueitan opened this issue Feb 10, 2014 · 4 comments
Open

img width percentage doesn't work #12

hueitan opened this issue Feb 10, 2014 · 4 comments

Comments

@hueitan
Copy link

hueitan commented Feb 10, 2014

Thanks for this cool plug-in !

Again percentage problem

http://plnkr.co/edit/lpBfmp

<img width="250px" src="..." /> <!-- Work -->
<img width="50%" src="..." /> <!-- Doesn't work -->
@yyx990803
Copy link
Owner

Does using style="width:50%" work?
This is should be relatively easy to fix if the above works.

@hueitan
Copy link
Author

hueitan commented Feb 10, 2014

<img style="width: 50%" src="...">

Works in demo http://plnkr.co/edit/lpBfmp

But the size didn't increase

and it's better if we can set it on attribute width

@pketh
Copy link

pketh commented Feb 15, 2014

Hey @huei90 after looking at your demo, I think the problem is that the default zoomerang size is set to be 300px. In the external script that you've added the listener too, set the config options for maxHeight and/or maxWidth. For example:

      window.onload=function(){
        Zoomerang.config({
          maxWidth: 1000,
          maxHeight: 1000
        })
        Zoomerang.listen('img')

@pketh
Copy link

pketh commented Feb 15, 2014

Now if we could define maxHeight or maxWidth to as percentage like 100% (i.e. original image full size), that'd truly be sweet. :)

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

No branches or pull requests

3 participants