Phoca Gallery Slideshow Vertical Center

Phoca Gallery modules - modules for Phoca Gallery extension
kemin
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 30 Nov 2012, 14:43

Phoca Gallery Slideshow Vertical Center

Post by kemin »

Hi, I'm trying to vertically center an image in the slideshow box editing fadeslideshow.js.
I solved replacing this code:

Code: Select all

setting.$gallerylayers=$('<div class="gallerylayer"></div><div class="gallerylayer"></div>') //two stacked DIVs to display the actual slide 
			.css({position:'absolute', left:0, top:'0, width:'100%', height:'100%', background:'black'})
with this:

Code: Select all

setting.$gallerylayers=$('<div class="gallerylayer"></div><div class="gallerylayer"></div>') //two stacked DIVs to display the actual slide 
			.css({position:'absolute', left:0, top:'50%', width:'100%', height:'100%', background:'black'})
but when the image is narrower than the box i see the previous image from behind. Could you help me to resolve? Is possible to enlarge smaller images?

Thanks.
kemin
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 30 Nov 2012, 14:43

Re: Phoca Gallery Slideshow Vertical Center

Post by kemin »

Ok, sorry. I don't know why but i solved by deleting "height".

Code: Select all

setting.$gallerylayers=$('<div class="gallerylayer"></div><div class="gallerylayer"></div>') //two stacked DIVs to display the actual slide 
			.css({position:'absolute', left:0, top:-setting.dimensions[1]/2, width:'100%', background:'black'})
at line 59.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Slideshow Vertical Center

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply