Template:Team:Bonn:SlideshowJS

From 2013.igem.org

(Difference between revisions)
Line 157: Line 157:
             // TODO: need to accomodate random start for slide transition setting
             // TODO: need to accomodate random start for slide transition setting
-
             if(settings.animtype === 'slide' && !settings.randomstart){
+
             if (settings.animtype === 'slide')
 +
                if(!settings.randomstart) {
                 state.currentindex = 1;
                 state.currentindex = 1;
                 state.currentslide = 2;
                 state.currentslide = 2;
Line 371: Line 372:
             // 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 && (responsive.width < settings.width)){
+
             if(settings.responsive)
 +
              if ((responsive.width < settings.width)){
                 $canvas.css({
                 $canvas.css({
Line 490: Line 492:
                 marker.on('click','a',function(e){
                 marker.on('click','a',function(e){
                     e.preventDefault();
                     e.preventDefault();
-
                     if(!state.animating && state.currentslide !== gotoslide){
+
                     if(!state.animating)
 +
                      if(state.currentslide !== gotoslide){
                         go(false,gotoslide);
                         go(false,gotoslide);
                     }
                     }
Line 531: Line 534:
                 }
                 }
-
                 if (state.paused && settings.automatic) {
+
                 if (state.paused)
 +
                  if(settings.automatic) {
                     state.interval = setInterval(function () {
                     state.interval = setInterval(function () {
                         go(vars.fwd);
                         go(vars.fwd);
Line 674: Line 678:
                     // 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 && ( responsive.width < settings.width ) ){
+
                     if(settings.responsive)
 +
                      if( responsive.width < settings.width ) ){
                         state.slidewidth = responsive.width;
                         state.slidewidth = responsive.width;
                     }
                     }

Revision as of 18:26, 1 October 2013