Lines Matching +full:g +full:- +full:touch

34 		HOME_SLIDE_SELECTOR = '.slides>section:first-of-type',
63 // Determines where controls appear, "edges" or "bottom-right"
64 controlsLayout: 'bottom-right',
74 // - true: Show slide number
75 // - false: Hide slide number
78 // - "h.v": Horizontal . vertical slide number (default)
79 // - "h/v": Horizontal / vertical slide number
80 // - "c": Flattened slide number
81 // - "c/t": Flattened slide number / total slides
90 // - "all": Always show the slide number
91 // - "print": Only when printing to PDF
92 // - "speaker": Only in the speaker view
122 // Enables touch navigation on devices with touch input
123 touch: true, property
153 // from 1.3 -> 2.1. If "grid" is used, the same navigation takes you
154 // from 1.3 -> 2.3.
171 // Flags if we should show a help overlay when the question-mark
182 // - null: Media will only autoplay if data-autoplay is present
183 // - true: All media will autoplay, regardless of individual setting
184 // - false: No media will autoplay, regardless of individual setting
187 // Global override for preloading lazy-loaded iframes
188 // - null: Iframes with data-src AND data-preload will be loaded when within
189 // the viewDistance, iframes with only data-src will be loaded when visible
190 // - true: All iframes with data-src will be loaded when within the viewDistance
191 // - false: All iframes with data-src will be loaded only when visible
195 // - 0: Auto-sliding only happens if the data-autoslide HTML attribute
197 // - 1+: All slides will progress automatically at the given interval
198 // - false: No auto-sliding, even if data-autoslide is present
201 // Stop auto-sliding after user input
204 // Use this method for navigation when auto-sliding (defaults to navigateNext)
222 // Add `data-preview-link` and `data-preview-link="false"` to customise each link
245 parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg"
248 parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px"
251 parallaxBackgroundRepeat: '', // repeat/repeat-x/repeat-y/no-repeat/initial/inherit
254 parallaxBackgroundPosition: '', // CSS syntax, e.g. "top left"
270 // on precisely the total height of the document whereas in-browser
272 pdfPageHeightOffset: -1,
323 // Slides may hold a data-state attribute which we pick up and apply
368 // The current auto-slide duration
374 autoSlideStartTime = -1,
377 // Holds information about the currently ongoing touch input
378 touch = { variable
406 document.body.setAttribute( 'class', 'no-transforms' );
417 if( element.getAttribute( 'data-src' ) ) {
418 element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
419 element.removeAttribute( 'data-src' );
527 if( --scriptsToLoad === 0 ) {
556 if( --pluginsToInitialize === 0 ) {
682 dom.slides.classList.remove( 'no-transition' );
717 dom.slides.classList.add( 'no-transition' );
720 dom.wrapper.classList.add( 'no-hover' );
723 dom.wrapper.classList.remove( 'no-hover' );
727 dom.wrapper.classList.add( 'ua-iphone' );
730 dom.wrapper.classList.remove( 'ua-iphone' );
742 …'<button class="navigate-left" aria-label="previous slide"><div class="controls-arrow"></div></but…
743 …'<button class="navigate-right" aria-label="next slide"><div class="controls-arrow"></div></button…
744 …'<button class="navigate-up" aria-label="above slide"><div class="controls-arrow"></div></button>'…
745 …'<button class="navigate-down" aria-label="below slide"><div class="controls-arrow"></div></button…
748 dom.slideNumber = createSingletonNode( dom.wrapper, 'div', 'slide-number', '' );
751 dom.speakerNotes = createSingletonNode( dom.wrapper, 'div', 'speaker-notes', null );
752 dom.speakerNotes.setAttribute( 'data-prevent-swipe', '' );
756 … = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', config.controls ? '<button class="res…
761 dom.controlsLeft = toArray( document.querySelectorAll( '.navigate-left' ) );
762 dom.controlsRight = toArray( document.querySelectorAll( '.navigate-right' ) );
763 dom.controlsUp = toArray( document.querySelectorAll( '.navigate-up' ) );
764 dom.controlsDown = toArray( document.querySelectorAll( '.navigate-down' ) );
765 dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) );
766 dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) );
769 dom.controlsRightArrow = dom.controls.querySelector( '.navigate-right' );
770 dom.controlsDownArrow = dom.controls.querySelector( '.navigate-down' );
776 * Creates a hidden div with role aria-live to announce the
777 * current slide content. Hide the div off-screen to make it
784 var statusDiv = document.getElementById( 'aria-status-div' );
792 statusDiv.setAttribute( 'id', 'aria-status-div' );
793 statusDiv.setAttribute( 'aria-live', 'polite' );
794 statusDiv.setAttribute( 'aria-atomic','true' );
817 var isAriaHidden = node.getAttribute( 'aria-hidden' );
853 …ction>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height…
855 document.body.classList.add( 'print-pdf' );
865 slide.setAttribute( 'data-slide-number', getSlideNumber( slide ) );
875 var left = ( pageWidth - slideWidth ) / 2,
876 top = ( pageHeight - slideHeight ) / 2;
886 top = Math.max( ( pageHeight - contentHeight ) / 2, 0 );
892 page.className = 'pdf-page';
916 notesElement.classList.add( 'speaker-notes' );
917 notesElement.classList.add( 'speaker-notes-pdf' );
918 notesElement.setAttribute( 'data-layout', notesLayout );
921 if( notesLayout === 'separate-page' ) {
927 notesElement.style.width = ( pageWidth - notesSpacing*2 ) + 'px';
938 numberElement.classList.add( 'slide-number' );
939 numberElement.classList.add( 'slide-number-pdf' );
940 numberElement.innerHTML = slide.getAttribute( 'data-slide-number' );
957 // Remove 'current-fragment' from the previous group
960 fragment.classList.remove( 'current-fragment' );
966 fragment.classList.add( 'visible', 'current-fragment' );
981 fragment.classList.remove( 'visible', 'current-fragment' );
988 toArray( page.querySelectorAll( '.fragment:not(.fade-out)' ) ).forEach( function( fragment ) {
998 dispatchEvent( 'pdf-ready' );
1071 dom.background.classList.add( 'no-transition' );
1097 // Make sure the below properties are set on the element - these properties are
1099 // annoying background slide-in effect when the presentation starts, apply
1102 dom.wrapper.classList.add( 'has-parallax-background' );
1109 dom.wrapper.classList.remove( 'has-parallax-background' );
1128 element.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' );
1132 contentElement.className = 'slide-background-content';
1160 slide.classList.remove( 'has-dark-background' );
1161 slide.classList.remove( 'has-light-background' );
1163 element.removeAttribute( 'data-loaded' );
1164 element.removeAttribute( 'data-background-hash' );
1165 element.removeAttribute( 'data-background-size' );
1166 element.removeAttribute( 'data-background-transition' );
1177 background: slide.getAttribute( 'data-background' ),
1178 backgroundSize: slide.getAttribute( 'data-background-size' ),
1179 backgroundImage: slide.getAttribute( 'data-background-image' ),
1180 backgroundVideo: slide.getAttribute( 'data-background-video' ),
1181 backgroundIframe: slide.getAttribute( 'data-background-iframe' ),
1182 backgroundColor: slide.getAttribute( 'data-background-color' ),
1183 backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
1184 backgroundPosition: slide.getAttribute( 'data-background-position' ),
1185 backgroundTransition: slide.getAttribute( 'data-background-transition' ),
1186 backgroundOpacity: slide.getAttribute( 'data-background-opacity' )
1190 // Auto-wrap image urls in url(...)
1192 slide.setAttribute( 'data-background-image', data.background );
1203 element.setAttribute( 'data-background-hash', data.background +
1216 if( data.backgroundSize ) element.setAttribute( 'data-background-size', data.backgroundSize );
1218 …if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroun…
1220 if( slide.hasAttribute( 'data-preload' ) ) element.setAttribute( 'data-preload', '' );
1249 slide.classList.add( 'has-dark-background' );
1252 slide.classList.add( 'has-light-background' );
1276 …if( typeof data === 'string' && data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}'…
1331 dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );
1332 dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );
1337 dom.controls.setAttribute( 'data-controls-layout', config.controlsLayout );
1338 dom.controls.setAttribute( 'data-controls-back-arrows', config.controlsBackArrows );
1364 …dom.speakerNotes.setAttribute( 'data-layout', typeof config.showNotes === 'string' ? config.showNo…
1384 // Auto-hide the mouse pointer when its inactive
1399 disablePreviewLinks( '[data-preview-link=false]' );
1403 enablePreviewLinks( '[data-preview-link]:not([data-preview-link=false])' );
1406 // Remove existing auto-slide controls
1412 // Generate auto-slide controls if needed
1415 return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 );
1426 element.classList.remove( 'current-fragment' );
1445 dom.wrapper.setAttribute( 'data-navigation-mode', config.navigationMode );
1448 dom.wrapper.removeAttribute( 'data-navigation-mode' );
1485 if( config.touch ) {
1499 // Fall back to touch events
1535 // Listen to both touch and click events, in case the device
1539 // Only support touch for Android, fixes double navigations in
1717 else if( value.match( /^-?[\d\.]+$/ ) ) return parseFloat( value );
1735 var dx = a.x - b.x,
1736 dy = a.y - b.y;
1836 * Converts various color input formats to an {r:0,g:0,b:0} object.
1848 * @return {{r: number, g: number, b: number, [a]: number}|null}
1852 var hex3 = color.match( /^#([0-9a-f]{3})$/i );
1857 g: parseInt( hex3.charAt( 1 ), 16 ) * 0x11,
1862 var hex6 = color.match( /^#([0-9a-f]{6})$/i );
1867 g: parseInt( hex6.substr( 2, 2 ), 16 ),
1876 g: parseInt( rgb[2], 10 ),
1885 g: parseInt( rgba[2], 10 ),
1896 * Calculates brightness on a scale of 0-255.
1906 return ( color.r * 299 + color.g * 587 + color.b * 114 ) / 1000;
1917 * remaining height = [ configured parent height ] - [ current parent height ]
1937 newHeight = height - element.parentNode.offsetHeight;
1957 return ( /print-pdf/gi ).test( window.location.search );
2035 span.setAttribute('data-title', anchor.text);
2069 * @param {string} [selector=a] - selector for anchors
2101 * @param {string} url - url for preview iframe src
2109 dom.overlay.classList.add( 'overlay-preview' );
2120 '<small class="viewport-inner">',
2121 …'<span class="x-frame-error">Unable to load iframe. This is likely due to the site\'s policy (x-fr…
2178 dom.overlay.classList.add( 'overlay-help' );
2202 '<div class="viewport-inner">'+ html +'</div>',
2232 * Applies JavaScript-controlled layout rules to the
2243 // cut off. To work around this we define our own '--vh' custom
2246 // https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
2248 document.documentElement.style.setProperty( '--vh', ( window.innerHeight * 0.01 ) + 'px' );
2301 transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } );
2323 slide.style.top = Math.max( ( size.height - slide.scrollHeight ) / 2, 0 ) + 'px';
2408 size.presentationWidth -= ( size.presentationWidth * config.margin );
2409 size.presentationHeight -= ( size.presentationHeight * config.margin );
2436 stack.setAttribute( 'data-previous-indexv', v || 0 );
2451 // Prefer manually defined start-indexv
2452 …var attributeName = stack.hasAttribute( 'data-start-indexv' ) ? 'data-start-indexv' : 'data-previo…
2473 dom.wrapper.classList.remove( 'overview-deactivating' );
2477 dom.wrapper.classList.add( 'overview-animated' );
2481 // Don't auto-slide while in overview mode
2503 overviewSlideWidth = -overviewSlideWidth;
2531 hslide.setAttribute( 'data-index-h', h );
2537 vslide.setAttribute( 'data-index-h', h );
2538 vslide.setAttribute( 'data-index-v', v );
2550 …toArray( hbackground.querySelectorAll( '.slide-background' ) ).forEach( function( vbackground, v )…
2569 'translateX('+ ( -indexh * overviewSlideWidth ) +'px)',
2570 'translateY('+ ( -indexv * overviewSlideHeight ) +'px)'
2588 dom.wrapper.classList.remove( 'overview-animated' );
2593 dom.wrapper.classList.add( 'overview-deactivating' );
2596 dom.wrapper.classList.remove( 'overview-deactivating' );
2610 …toArray( dom.background.querySelectorAll( '.slide-background' ) ).forEach( function( background ) {
2721 * @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode
2938 previousSlide.setAttribute( 'aria-hidden', 'true' );
3029 // Start auto-sliding if it's enabled
3032 // Re-create the slide backgrounds
3066 * example, if you add a new `data-background-image` you can call
3122 verticalSlide.setAttribute( 'aria-hidden', 'true' );
3204 index = Math.max( Math.min( index, slidesLength - 1 ), 0 );
3215 // http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute
3217 element.setAttribute( 'aria-hidden', 'true' );
3238 fragment.classList.remove( 'current-fragment' );
3250 fragment.classList.remove( 'current-fragment' );
3259 slides[index].removeAttribute( 'aria-hidden' );
3263 var slideState = slides[index].getAttribute( 'data-state' );
3316 distanceX = Math.abs( ( indexh || 0 ) - x ) || 0;
3321 … distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0;
3339 distanceY = x === ( indexh || 0 ) ? Math.abs( ( indexv || 0 ) - y ) : Math.abs( y - oy );
3354 dom.wrapper.classList.add( 'has-vertical-slides' );
3357 dom.wrapper.classList.remove( 'has-vertical-slides' );
3362 dom.wrapper.classList.add( 'has-horizontal-slides' );
3365 dom.wrapper.classList.remove( 'has-horizontal-slides' );
3382 …dom.speakerNotes.innerHTML = getSlideNotes() || '<span class="notes-placeholder">No notes on this …
3397 dom.wrapper.classList.add( 'show-notes' );
3400 dom.wrapper.classList.remove( 'show-notes' );
3411 return dom.slides.querySelectorAll( '[data-notes], aside.notes' ).length > 0;
3506 '<span class="slide-number-a">'+ a +'</span>' +
3507 '<span class="slide-number-delimiter">'+ delimiter +'</span>' +
3508 '<span class="slide-number-b">'+ b +'</span>' +
3513 '<span class="slide-number-a">'+ a +'</span>' +
3629 …toArray( backgroundh.querySelectorAll( '.slide-background' ) ).forEach( function( backgroundv, v )…
3665 var currentBackgroundContent = currentBackground.querySelector( '.slide-background-content' );
3681 …groundHash = previousBackground ? previousBackground.getAttribute( 'data-background-hash' ) : null;
3682 var currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' );
3684 dom.background.classList.add( 'no-transition' );
3694 [ 'has-light-background', 'has-dark-background' ].forEach( function( classToBubble ) {
3706 dom.background.classList.remove( 'no-transition' );
3742 …ltiplier = horizontalSlideCount > 1 ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 …
3745 horizontalOffset = horizontalOffsetMultiplier * indexh * -1;
3756 verticalOffsetMultiplier = ( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 );
3761 dom.background.style.backgroundPosition = horizontalOffset + 'px ' + -verticalOffset + 'px';
3781 preload = element.hasAttribute( 'data-preload' );
3790 * that is set to load lazily (data-src).
3801 // Media elements with data-src attributes
3802 …toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src], iframe[data-src…
3804 element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
3805 element.setAttribute( 'data-lazy-loaded', '' );
3806 element.removeAttribute( 'data-src' );
3814 toArray( media.querySelectorAll( 'source[data-src]' ) ).forEach( function( source ) {
3815 source.setAttribute( 'src', source.getAttribute( 'data-src' ) );
3816 source.removeAttribute( 'data-src' );
3817 source.setAttribute( 'data-lazy-loaded', '' );
3835 var backgroundIframe = slide.getAttribute( 'data-background-iframe' );
3838 if( background.hasAttribute( 'data-loaded' ) === false ) {
3839 background.setAttribute( 'data-loaded', 'true' );
3841 var backgroundImage = slide.getAttribute( 'data-background-image' ),
3842 backgroundVideo = slide.getAttribute( 'data-background-video' ),
3843 backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ),
3844 backgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' );
3886 iframe.setAttribute( 'data-src', backgroundIframe );
3898 var backgroundIframeElement = backgroundContent.querySelector( 'iframe[data-src]' );
3936 // Reset lazy-loaded media elements with src attributes
3937 …oArray( slide.querySelectorAll( 'video[data-lazy-loaded][src], audio[data-lazy-loaded][src], ifram…
3938 element.setAttribute( 'data-src', element.getAttribute( 'src' ) );
3942 // Reset lazy-loaded media elements with <source> children
3943 …toArray( slide.querySelectorAll( 'video[data-lazy-loaded] source[src], audio source[src]' ) ).forE…
3944 source.setAttribute( 'data-src', source.getAttribute( 'src' ) );
3962 right: indexh < horizontalSlides.length - 1,
3964 down: indexv < verticalSlides.length - 1
4005 prev: fragments.length - hiddenFragments.length > 0,
4016 * Enforces origin-specific format rules for embedded media.
4023 if( src && src.indexOf( param ) === -1 ) {
4031 _appendParamToIframeSource( 'data-src', 'youtube.com/embed/', 'enablejsapi=1' );
4035 _appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' );
4068 autoplay = el.hasAttribute( 'data-autoplay' ) || !!closestParent( el, '.slide-background' );
4114 toArray( element.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) {
4119 if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) {
4122 el.setAttribute( 'src', el.getAttribute( 'data-src' ) );
4173 …autoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closestParent( iframe, '.slide-background' …
4211 if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {
4212 el.setAttribute('data-paused-by-reveal', '');
4217 // Generic postMessage API for non-lazy loaded iframes
4225 …if( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage =…
4232 …if( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage =…
4238 // Unload lazy-loaded iframes
4239 toArray( element.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) {
4303 * Returns a value ranging from 0-1 that represents
4324 // that is made up by its fragments (0-1)
4333 return Math.min( pastCount / ( totalCount - 1 ), 1 );
4362 if( !/^[0-9]*$/.test( bits[0] ) && name.length ) {
4391 var h = ( parseInt( bits[0], 10 ) - hashIndexBase ) || 0,
4392 v = ( parseInt( bits[1], 10 ) - hashIndexBase ) || 0,
4485 var currentFragment = currentSlide.querySelector( '.current-fragment' );
4486 if( currentFragment && currentFragment.hasAttribute( 'data-fragment-index' ) ) {
4487 f = parseInt( currentFragment.getAttribute( 'data-fragment-index' ), 10 );
4490 f = currentSlide.querySelectorAll( '.fragment.visible' ).length - 1;
4618 * 1. As a data-notes attribute on the slide <section>
4629 // Notes can be specified via the data-notes attribute...
4630 if( slide.hasAttribute( 'data-notes' ) ) {
4631 return slide.getAttribute( 'data-notes' );
4692 * "data-fragment-index" attribute.
4699 * to be passed in document order. This function adds a "fragment-index"
4719 if( fragment.hasAttribute( 'data-fragment-index' ) ) {
4720 var index = parseInt( fragment.getAttribute( 'data-fragment-index' ), 10 );
4746 fragment.setAttribute( 'data-fragment-index', index );
4758 * have the appropriate classes (.visible + .current-fragment).
4784 index = parseInt( currentFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );
4790 if( el.hasAttribute( 'data-fragment-index' ) ) {
4791 i = parseInt( el.getAttribute( 'data-fragment-index' ), 10 );
4800 el.classList.remove( 'current-fragment' );
4806 el.classList.add( 'current-fragment' );
4814 el.classList.remove( 'current-fragment' );
4822 index = typeof index === 'number' ? index : -1;
4823 index = Math.max( Math.min( index, maxIndex ), -1 );
4824 currentSlide.setAttribute( 'data-fragment', index );
4838 * should be shown, -1 means all are invisible
4857 index = parseInt( lastVisibleFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );
4860 index = -1;
4916 return navigateFragment( null, -1 );
4929 var fragment = currentSlide.querySelector( '.current-fragment' );
4932 // we look for a data-autoslide timing on the first fragment
4935 var fragmentAutoSlide = fragment ? fragment.getAttribute( 'data-autoslide' ) : null;
4936 …var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autosl…
4937 var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' );
4940 // 1. Current fragment's data-autoslide
4941 // 2. Current slide's data-autoslide
4942 // 3. Parent slide's data-autoslide
4957 // If there are media elements with data-autoplay,
4964 if( el.hasAttribute( 'data-autoplay' ) ) {
4972 // Cue the next auto-slide if:
4973 // - There is an autoSlide value
4974 // - Auto-sliding isn't paused by the user
4975 // - The presentation isn't paused
4976 // - The overview isn't active
4977 // - The presentation isn't over
4987 autoSlidePlayer.setPlaying( autoSlideTimeout !== -1 );
4995 * Cancels any ongoing request to auto-slide.
5000 autoSlideTimeout = -1;
5038 slide( indexh - 1, config.navigationMode === 'grid' ? indexv : undefined );
5050 slide( indexh - 1, config.navigationMode === 'grid' ? indexv : undefined );
5064 slide( indexh, indexv - 1 );
5105 var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined;
5106 var h = indexh - 1;
5154 if( target.hasAttribute( 'data-prevent-swipe' ) ) return true;
5163 // --------------------------------------------------------------------//
5164 // ----------------------------- EVENTS -------------------------------//
5165 // --------------------------------------------------------------------//
5227 // Remember if auto-sliding was paused so we can toggle it
5235 …tes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( documen…
5263 if( isPaused() && resumeKeyCodes.indexOf( keyCode ) === -1 ) {
5268 // the presentation is one-dimensional
5400 // TWO-SPOT, SEMICOLON, B, V, PERIOD, LOGITECH PRESENTER TOOLS "BLACK SCREEN" BUTTON
5437 // If auto-sliding is enabled we need to cue up
5453 touch.startX = event.touches[0].clientX;
5454 touch.startY = event.touches[0].clientY;
5455 touch.startCount = event.touches.length;
5468 // Each touch should only trigger one action
5469 if( !touch.captured ) {
5475 // There was only one touch point, look for a swipe
5476 if( event.touches.length === 1 && touch.startCount !== 2 ) {
5478 var deltaX = currentX - touch.startX,
5479 deltaY = currentY - touch.startY;
5481 if( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
5482 touch.captured = true;
5495 else if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
5496 touch.captured = true;
5509 else if( deltaY > touch.threshold ) {
5510 touch.captured = true;
5518 else if( deltaY < -touch.threshold ) {
5519 touch.captured = true;
5528 // If we're embedded, only block touch events if they have
5531 if( touch.captured || isVerticalSlide( currentSlide ) ) {
5558 touch.captured = false;
5563 * Convert pointer down to touch start.
5569 if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
5577 * Convert pointer move to touch move.
5583 if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
5591 * Convert pointer up to touch end.
5597 if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
5612 if( Date.now() - lastMouseWheelStep > 600 ) {
5616 var delta = event.detail || -event.wheelDelta;
5646 slideIndex = slidesTotal - slideIndex;
5699 // Not all elements support .blur() - SVGs among them.
5731 var h = parseInt( element.getAttribute( 'data-index-h' ), 10 ),
5732 v = parseInt( element.getAttribute( 'data-index-v' ), 10 );
5761 * Handles click on the auto-sliding controls element.
5784 // --------------------------------------------------------------------//
5785 // ------------------------ PLAYBACK COMPONENT ------------------------//
5786 // --------------------------------------------------------------------//
5797 * of 0-1
5809 // Current progress on a 0-1 range
5877 radius = ( this.diameter2 ) - this.thickness,
5883 this.progressOffset += ( 1 - this.progressOffset ) * 0.1;
5885 var endAngle = ( - Math.PI / 2 ) + ( progress * ( Math.PI * 2 ) );
5886 var startAngle = ( - Math.PI / 2 ) + ( this.progressOffset * ( Math.PI * 2 ) );
5913 this.context.translate( x - ( iconSize / 2 ), y - ( iconSize / 2 ) );
5918 this.context.fillRect( 0, 0, iconSize / 2 - 4, iconSize );
5919 this.context.fillRect( iconSize / 2 + 4, 0, iconSize / 2 - 4, iconSize );
5925 this.context.lineTo( iconSize - 4, iconSize / 2 );
5954 // --------------------------------------------------------------------//
5955 // ------------------------------- API --------------------------------//
5956 // --------------------------------------------------------------------//
6037 // Presentation progress on range of 0-1
6095 location.search.replace( /[A-Z0-9]+?=([\w\.%-]*)/gi, function(a) {
6109 // Returns the top-level DOM element