ashleydw / lightbox

A lightbox gallery plugin for Bootstrap
http://ashleydw.github.io/lightbox
MIT License
1.85k stars 1.3k forks source link

Modal resize animation #249

Open flierville opened 7 years ago

flierville commented 7 years ago

Hello,

Is possible to add a function that resizes slowly (animation) the modal when the image is loading ?

ashleydw commented 7 years ago

I tried this but couldn't figure out any nice way of doing it, perhaps you or someone else will have more luck

flierville commented 7 years ago

Inside the key: '_resize',

I juste add the Tow lines :

$(".modal-content").animate({"height":maxHeight + 89});
$(".modal-dialog").animate({"width":"auto"});

just Before this lines :

this._$lightboxContainer.css('height', maxHeight);
this._$modalDialog.css('width', 'auto').css('maxWidth', width);

I have something almost correct