Template:Team:Bonn:SlideshowJS
From 2013.igem.org
(Difference between revisions)
(3 intermediate revisions not shown) | |||
Line 138: | Line 138: | ||
// enable pause on hover | // enable pause on hover | ||
- | if (settings.hoverpause) | + | if (settings.hoverpause) |
+ | if (settings.automatic) { | ||
conf_hoverpause(); | conf_hoverpause(); | ||
} | } | ||
Line 157: | Line 158: | ||
// TODO: need to accomodate random start for slide transition setting | // TODO: need to accomodate random start for slide transition setting | ||
- | if(settings.animtype === 'slide' | + | if (settings.animtype === 'slide') |
+ | if(!settings.randomstart) { | ||
state.currentindex = 1; | state.currentindex = 1; | ||
state.currentslide = 2; | state.currentslide = 2; | ||
Line 371: | Line 373: | ||
// if the slider is responsive && the calculated width is less than the max width | // if the slider is responsive && the calculated width is less than the max width | ||
- | if(settings.responsive | + | if(settings.responsive) |
+ | if ((responsive.width < settings.width)){ | ||
$canvas.css({ | $canvas.css({ | ||
Line 490: | Line 493: | ||
marker.on('click','a',function(e){ | marker.on('click','a',function(e){ | ||
e.preventDefault(); | e.preventDefault(); | ||
- | if(!state.animating | + | if(!state.animating) |
+ | if(state.currentslide !== gotoslide){ | ||
go(false,gotoslide); | go(false,gotoslide); | ||
} | } | ||
Line 531: | Line 535: | ||
} | } | ||
- | if (state.paused | + | if (state.paused) |
+ | if(settings.automatic) { | ||
state.interval = setInterval(function () { | state.interval = setInterval(function () { | ||
go(vars.fwd); | go(vars.fwd); | ||
Line 674: | Line 679: | ||
// if the slider is responsive && the calculated width is less than the max width | // if the slider is responsive && the calculated width is less than the max width | ||
- | if(settings.responsive | + | if(settings.responsive) |
+ | if( responsive.width < settings.width ){ | ||
state.slidewidth = responsive.width; | state.slidewidth = responsive.width; | ||
} | } |
Latest revision as of 18:29, 1 October 2013