tapmodo / Jcrop

Jcrop - The Javascript Image Cropping Engine
https://jcrop.com
Other
4.31k stars 938 forks source link

img {max-width: 100%} distorts coordinates #82

Open niklasalberth opened 11 years ago

niklasalberth commented 11 years ago

I discovered that Bootstrap (v 2.2.2) sets img {max-width: 100%} and that distorts the coordinates from jcrop. My guess is that the scaling puts jcrop off if the image is inside a smaller container. In my case I had a 1500px wide image inside a 940px div using jcrops boxWidth to handle the large image.

My quick fix was to set max-width: none; on the img tag in question.

yury commented 11 years ago

I make PR for that https://github.com/tapmodo/Jcrop/pull/75