Skip to content

Commit bdf9787

Browse files
committed
#45 fix for other title position
1 parent d5d68e5 commit bdf9787

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

assets/js/jquery.fancybox.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3182,6 +3182,20 @@
31823182

31833183
if($('.fancybox-custom-caption.inside-caption').length ){
31843184
custom_caption_outerHeight = $el.find('.fancybox-custom-caption').outerHeight();
3185+
} else {
3186+
custom_caption_outerHeight = ($el.find('.fancybox-image').outerHeight() - $el.find('.fancybox-image').height())/2;
3187+
// Seems like different border width for image requires a little trimming
3188+
if(custom_caption_outerHeight > 20 && custom_caption_outerHeight < 25 ){
3189+
custom_caption_outerHeight -= 2;
3190+
}
3191+
3192+
if(custom_caption_outerHeight >= 25 && custom_caption_outerHeight <= 30){
3193+
custom_caption_outerHeight -= 4;
3194+
}
3195+
3196+
if(custom_caption_outerHeight > 30){
3197+
custom_caption_outerHeight -= 6;
3198+
}
31853199
}
31863200

31873201
if (props.height !== undefined) {

0 commit comments

Comments
 (0)