Hi,
I added a slideshow webpart but wanted it to be full-size, as the normal specifications make it smaller than anticipated. I found a code that works perfectly, but after one or two slide transitions the slideshow starts jumping causing the whole page to move momentarily. I added a Script Editor below the slideshow, and have tried placing it before the slideshow also but it doesn’t work. If anyone knows an adjustment to the code to make this stop or something I need to remove to make it stop, it would be greatly appreciated!!
<script type=”text/javascript”>Â Â Â function SlideshowObjectInitializer() {
     ShowPic = (function(ShowPicOrig) {
     return function() {
          var ssObj = arguments[0]; //SlideShow object
          var curPicIdx=ssObj.index; //current picture index
          ShowPicOrig.apply(this, arguments); //call original ShowPic
          //apply some changes to display original picture in SlideShow control
          ssObj.image.src = ssObj.linkArray[curPicIdx]; //display original image instead of web image
          //change picture & container size to auto instead of fixed (by default web image size is used)
            ssObj.image.setAttribute(‘height’,’100%’);
            ssObj.image.setAttribute(‘width’,’100%’);
            var cell = ssObj.cell;
            cell.style.width = ‘auto’;
            cell.style.height = ‘auto’;
            cell.style.display = ”;
            var pcell = ssObj.cell.parentNode;
          pcell.style.width = ‘auto’;
            pcell.style.height = ‘auto’;
     };
 })(ShowPic);
}Â
ExecuteOrDelayUntilScriptLoaded(SlideshowObjectInitializer, ‘imglib.js’);
</script>
You can add a Script Editor web part to the page with a style tag in it to hold your custom CSS.
No because I don’t know how to access the style sheet… I’ve tried many times but I can’t get to it. Do you know of any other way/code I could use to just make the normal webpart full size? I know it’s easy in CSS but I’m not very familiar with SharePoint designer and I worry that I’ll break something
Thanks, I figured it had something to do with a delay, but I’m only somewhat familiar with HTML and CSS but not javascript.
So, that function is calling the old function (which I presume displays at a different size) and then changes the size afterwards to your custom size. If this happens fast enough, a user may not perceive the change. In your case, there is enough delay that you see the old size then the new size. This is a natural side-effect of the way this override was implemented. I’m not familiar enough with the web part to offer more advice than this unfortunately.Â