VerticalFIt doesn't take in consideration caption / title
Hey,
first I must say very good job on this jquery plugin :)
I came across a problem where verticalFit doesn't take in consideration caption / title. Therefore i tried with a workaround, but it wasn't what I was looking for. My current workaround works through callback and verticalFit on true.
callbacks: {
updateStatus: function(data) {
if(data.status === 'ready') {
var imageHeight = parseInt($('.mfp-img').css('max-height'));
var titleHeight = parseInt($('.mfp-title').height());
var newHeight = imageHeight-titleHeight;
$('.mfp-img').css('max-height', newHeight);
}
}
}
But when i change the image in gallery, immediate recalculation of height is visible and image jumps after a few milliseconds.
Is there a better way to recalculate and change max-height so that it will take in consideration also mfp-title but there will be no visible feedback?
@matjazu Have you found a solution/fix for this?
@chithract I do not remember and I do not find this anywhere in old code. So sry I can not give you any more info regarding this.
@matjazu I found a solution with https://github.com/dimsemenov/Magnific-Popup/issues/843. Thanks for your reply.