add embed option

This commit is contained in:
Hakim El Hattab 2013-08-10 14:30:24 -04:00
parent 0add83e9ed
commit 785bee596b
2 changed files with 18 additions and 3 deletions

View file

@ -59,6 +59,10 @@ var Reveal = (function(){
// Turns fragments on and off globally
fragments: true,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embed: false,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
@ -2371,7 +2375,18 @@ var Reveal = (function(){
navigateDown();
}
// If we're embedded, only block touch events if they have
// triggered an action
if( config.embed ) {
if( touch.captured || isVerticalSlide( currentSlide ) ) {
event.preventDefault();
}
}
// Not embedded? Block them all to avoid needless tossing
// around of the viewport in iOS
else {
event.preventDefault();
}
}
}

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long