Update layout logic to determine spacing between visible slides.