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>
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.