1 vote
Slideshow not display controls for 1 slide

Description

 
After utilizing the slideshow with a database-fed webservice, I really wanted it to not display the next/prev/play controls if only one item was returned.
I've 'fixed' my code to do so, in line 772 of SlideShowBehavior.js (method _initSlides):

<existing code line=770>
this._slides = sender;
if (this._slides) {
</existing code>
<new code line=772>
if (this._slides.length < 2) {
//No images to display, hide buttons
document.getElementById(this._playButtonID).style.visibility = 'hidden';
document.getElementById(this._nextButtonID).style.visibility = 'hidden';
document.getElementById(this._previousButtonID).style.visibility = 'hidden';
}
</new code>
<existing code>
this._images = new Array();
</existing code>

I'm sure you would want to parameterize this better for a release, but here is the concept, which I think would make a great addition to the toolkit.

File Attachments


Comments

most recent at top (show oldest at top)

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987