no image can be wider than 33%

This commit is contained in:
Alexander Yakovlev 2017-11-26 01:27:01 +07:00
parent 6af56953be
commit 816c1cab53

View file

@ -27,8 +27,8 @@ jQuery(document).on('click', '#pack', () ->
fr.onload = ((aImg) ->
(e) ->
aImg.src = e.target.result
if jQuery(aImg).width() > jQuery("#masonryslide").width()
jQuery(aImg).width("100%")
if jQuery(aImg).width() > (jQuery("#masonryslide").width() / 3)
jQuery(aImg).width("33%")
grid.layout()
resolve()
)(img)