Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

oPgwSlideshow.displaySlide(4) immediately after load prevents images from showing #18

Open
glt101 opened this issue Mar 3, 2016 · 4 comments

Comments

@glt101
Copy link

glt101 commented Mar 3, 2016

Hi Pawaga people,

Been wrestling with this for a few days and got nowhere.
I want to set the image that is displayed when the page first loads.
I am using:
$(function () { var oPgwSlideshow = $('.pgwSlideshow').pgwSlideshow({ maxHeight: 450 }); oPgwSlideshow.displaySlide(4); });
However when I do this, no images are displayed in the center of the carousel.
This seems to be because they are all set to have maxHeight = 0px.
If I comment out the call to displaySlide() it works fine.

Any suggestions on how to get this working?

Cheers,
Geoff

@montoyaedu
Copy link

Hello, did you find a solution? It happens sometimes to me even if I do not use directly the method displaySlide, as I commented on #19

@JohnGL25
Copy link

JohnGL25 commented Jan 5, 2017

I'm having the same issue and have not been able to find a solution. Anyone else? Thank you.

@montoyaedu
Copy link

Hello John,

It has been a long time ago and I don't remember well if I solved it. I am using PgwSlideshow on the following site: http://www.sihammorsyl.com/

If you have time, you can verify if the issue is happening to you. I will try to look on the repository to see if I find any commit that corrects this behaviour.

Cheers,

Edu.

@montoyaedu
Copy link

Hello!

I think I solved it in the following way:

Commit's message was:

Fix bug that prevented from showing initial image when image has been not yet loaded completely. We set a height by calculating it from a configured height/width ratio.

fix

Maybe it give you a hint on how to resolve your specific problem. I think the trick is that you need to specify a height because if the image is not completely loaded, the code will fail to calculate it correctly.

Hope it helps!

Cheers,

Edu.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants