MCPcopy
hub / github.com/hakimel/reveal.js / bind

Method bind

js/controllers/touch.js:34–57  ·  view source on GitHub ↗

*

()

Source from the content-addressed store, hash-verified

32 *
33 */
34 bind() {
35
36 let revealElement = this.Reveal.getRevealElement();
37
38 if( 'onpointerdown' in window ) {
39 // Use W3C pointer events
40 revealElement.addEventListener( 'pointerdown', this.onPointerDown, false );
41 revealElement.addEventListener( 'pointermove', this.onPointerMove, false );
42 revealElement.addEventListener( 'pointerup', this.onPointerUp, false );
43 }
44 else if( window.navigator.msPointerEnabled ) {
45 // IE 10 uses prefixed version of pointer events
46 revealElement.addEventListener( 'MSPointerDown', this.onPointerDown, false );
47 revealElement.addEventListener( 'MSPointerMove', this.onPointerMove, false );
48 revealElement.addEventListener( 'MSPointerUp', this.onPointerUp, false );
49 }
50 else {
51 // Fall back to touch events
52 revealElement.addEventListener( 'touchstart', this.onTouchStart, false );
53 revealElement.addEventListener( 'touchmove', this.onTouchMove, false );
54 revealElement.addEventListener( 'touchend', this.onTouchEnd, false );
55 }
56
57 }
58
59 /**
60 *

Callers 15

plugin.jsFile · 0.45
loadExternalMarkdownFunction · 0.45
KaTeXFunction · 0.45
addEventListenersFunction · 0.45
reveal.jsFile · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
loadMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls 1

getRevealElementMethod · 0.80

Tested by

no test coverage detected