alexk111 / ngImgCrop

Image Crop directive for AngularJS (THIS PROJECT IS NOT MAINTAINED ANYMORE)
MIT License
1.12k stars 515 forks source link

Made sure width and height of cropped image do not exceed image size #114

Open aouji opened 9 years ago

aouji commented 9 years ago

Fixes #43.

On firefox, due to floating point precision issues, in some cases size*xRatio ends up becoming something like 0.0000006 bigger than image width. This just makes sure the clip height and width do not go beyond image boundaries

TheFarmer1 commented 8 years ago

Don't do this! Let me crop bigger so I can change a rectangle to square. Fill with transparent.