syncProgressBar() {

		this.progressBarInner.querySelectorAll( '.scrollbar-slide' ).forEach( slide => slide.remove() );

		const scrollHeight = this.viewportElement.scrollHeight;
		const viewportHeight = this.viewportElement.offsetHeight;
		const viewportHeightFactor = viewportHeight / scrollHeight;

		this.progressBarHeight = this.progressBarInner.offsetHeight;
		this.playheadHeight = Math.max( viewportHeightFactor * this.progressBarHeight, MIN_PLAYHEAD_HEIGHT );
		this.progressBarScrollableHeight = this.progressBarHeight - this.playheadHeight;

		const progressSegmentHeight = viewportHeight / scrollHeight * this.progressBarHeight;
		const spacing = Math.min( progressSegmentHeight / 8, MAX_PROGRESS_SPACING );

		this.progressBarPlayhead.style.height = this.playheadHeight - spacing + 'px';

		// Don't show individual segments if they're too small
		if( progressSegmentHeight > MIN_PROGRESS_SEGMENT_HEIGHT ) {

			this.slideTriggers.forEach( slideTrigger => {

				const { page } = slideTrigger;

				// Visual representation of a slide
				page.progressBarSlide = document.createElement( 'div' );
				page.progressBarSlide.className = 'scrollbar-slide';
				page.progressBarSlide.style.top = slideTrigger.range[0] * this.progressBarHeight + 'px';
				page.progressBarSlide.style.height = ( slideTrigger.range[1] - slideTrigger.range[0] ) * this.progressBarHeight - spacing + 'px';
				page.progressBarSlide.classList.toggle( 'has-triggers', page.scrollTriggers.length > 0 );
				this.progressBarInner.appendChild( page.progressBarSlide );

				// Visual representations of each scroll trigger
				page.scrollTriggerElements = page.scrollTriggers.map( ( trigger, i ) => {

					const triggerElement = document.createElement( 'div' );
					triggerElement.className = 'scrollbar-trigger';
					triggerElement.style.top = ( trigger.range[0] - slideTrigger.range[0] ) * this.progressBarHeight + 'px';
					triggerElement.style.height = ( trigger.range[1] - trigger.range[0] ) * this.progressBarHeight - spacing + 'px';
					page.progressBarSlide.appendChild( triggerElement );

					if( i === 0 ) triggerElement.style.display = 'none';

					return triggerElement;

				} );

			} );

		}
		else {

			this.pages.forEach( page => page.progressBarSlide = null );

		}

	}
Rerenders progress bar segments so that they match the current
reveal.js config and size.