repp / BalancedGallery

A balanced photo gallery plugin for jQuery.
Do What The F*ck You Want To Public License
155 stars 34 forks source link

Rounding errors sum up after 5 resizes #5

Open diederikfeilzer opened 9 years ago

diederikfeilzer commented 9 years ago

Hi, Great plugin, I noticed that when the user does a couple of resizes, the rounding errors seem to sum up and aspect-ratios of the images are lost. Since modern browsers seem to handle decimal places in style tags very well I suggest you either use the decimal places like 123.45995 px to increase the number of allowed resizes or completely redraw each time, but I get that last one is not preferable. Maybe store the original aspect ratios in a data-aspectratio attribute in the image its self.

vburlak commented 9 years ago

hi, @diederik789 Have you any thoughts at this issue?