fancybox icon indicating copy to clipboard operation
fancybox copied to clipboard

Thumbnail Helper - is there a way to position the thumbnails other than at the bottom?

Open sbenes opened this issue 14 years ago • 21 comments

I was just curious as I did not see any options in the code with a quick glance to position the thumbnails. Some of the designs we get have thumbnails relative to the box and would be nice if there were options to have the wrapping div either inside or outside of the fancybox container.

Thanks!

sbenes avatar Dec 09 '11 21:12 sbenes

You`d like to have thumbnails inside wrapper? I have never had a thought about that. I can easy add option to position at the top or bottom but inside .. that would work quite awkward as gallery items can be different sizes (especially for elastic animations).

If you wish, you can create custom helper (button/thumb helpers were initially created only as examples)

fancyapps avatar Dec 09 '11 21:12 fancyapps

Yea I was looking in to creating my own helper, but I figured that we may not be the only ones who could make use of this option.

Here are a couple quick mockups of how we have used them in designs. These again would not work for every dimension of image, but when you have standard image sizes, it can fit into a design nicely.

http://img580.imageshack.us/img580/3554/fancyboxthumbsoutside.jpg http://img197.imageshack.us/img197/9620/fancyboxthumbsinside.jpg

Thanks for the quick responses!

sbenes avatar Dec 09 '11 22:12 sbenes

I agree the first version (http://img580.imageshack.us/img580/3554/fancyboxthumbsoutside.jpg) would be very useful for ecommerce where the majority of images are the same size and ratio.

It would be quite nice to include them in the white border box just below the caption.

SiCoUK avatar Dec 19 '11 08:12 SiCoUK

Is there any update about this?

Thimp avatar Jan 16 '12 16:01 Thimp

Still need it... any update?

arturhaddad avatar Jan 23 '12 19:01 arturhaddad

Looks like it needs to be upgraded as many people keep asking for more features. I`ll finish some other tasks on my to-do list and will rewrite it afterwards.

fancyapps avatar Jan 24 '12 21:01 fancyapps

Would be nice to have a left/right feature aswell :)

ghost avatar Mar 02 '12 20:03 ghost

If anyone is still looking for a solution on this, here it is. On jquery.fancybox-thumbs.js:

Update this line: this.wrap = $('

').appendTo('body');

to: this.wrap = $('

').appendTo('.fancybox-wrap');

Second change, after this line: this.list.children().removeClass('active').eq(obj.index).addClass('active');

add this: if (this.wrap) {this.wrap.appendTo('.fancybox-wrap');}

You will also need to correct the #fancybox-thumbs positioning from 'fixed' to 'relative' and add some margins to make it fit as you want.

sprinchy avatar Sep 19 '12 16:09 sprinchy

HTML got stripped on the solution above. The first change should update the appendTo value on line 62 from 'body' to '.fancybox-wrap'.

sprinchy avatar Sep 19 '12 16:09 sprinchy

thumb ul position is not good. If I change #fancybox-thumbs position,#fancybox-thumbs ul li.active is not in center in screen.I suggest "this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));" change to "this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($("#fancybox-thumbs").width() * 0.5 - (obj.index * this.width + this.width * 0.5)));"

zsytssk avatar Nov 26 '12 03:11 zsytssk

hello, im looking to do something very similar. the only difference is I want the button helper inside the wrapper. I appended it the .fancybox skin--it appeared inside the wrapper, but when you click next or prev buttons the helper disappears. because of the wrapper refresh. any help is appreciated, thanks in advance

marcboogie avatar May 09 '13 21:05 marcboogie

Hello, I was wondering if it is hard to make thumbnail helper to be vertical not horizontal? or maybe somebody already made that? lets say on the left or right side. that should be more effective space usage on the widescreens and it will allow to see bigger photos on the screen.

einius avatar Jul 07 '13 12:07 einius

You could create a new helper based on the default one.

fancyapps avatar Jul 08 '13 14:07 fancyapps

Thnx you sprinchy i am looking for the same changes. But the problem is now with img thumb positioning on a click. How can i center them ?

DonDi1989 avatar Aug 03 '13 19:08 DonDi1989

Hello,
I was wondering if it is hard to make thumbnail helper to be vertical not horizontal? or maybe somebody already made that? lets say on the left or right side. that should be more effective space usage on the widescreens and it will allow to see bigger photos on the screen.

Would be the best: image width > height -> horizontal thumbnail div image width < height -> vertical thumbnail div (even positionable to the lfet or to the right) and also: 2 columns of thumbails on both sides or only one side.

Konstantinusz avatar Feb 10 '17 00:02 Konstantinusz

You can upgrade to v3 and play with CSS to reposition each block - http://codepen.io/fancyapps/pen/vgRajd/

fancyapps avatar Feb 16 '17 22:02 fancyapps

@fancyapps why did you delete my comment? :disappointed:

Above demos have two UX/UI moments:

On small screen devices thumbs can still be displayed screenshot from 2019-01-23 11-47-03

Thumbs should be centered horizontally screenshot from 2019-01-23 11-46-37

AlexanderMatveev avatar Jan 23 '19 08:01 AlexanderMatveev

@AlexanderMatveev

1)Your comment has not been deleted, you posted that in the different issue. 2) If you did not know, you can add your own CSS to customize anything to your taste.

fancyapps avatar Jan 23 '19 08:01 fancyapps

  1. my mistake, sorry
  2. is there any plans to support this as feature?

AlexanderMatveev avatar Jan 23 '19 08:01 AlexanderMatveev

Yes, it is planned to rewrite thumbnail helper completely to add nex/prev page buttons, dragging, etc

fancyapps avatar Jan 23 '19 09:01 fancyapps