Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
2
2015-12-uni-ffm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CmS
2015-12-uni-ffm
Commits
2962325f
Commit
2962325f
authored
12 years ago
by
Hakim El Hattab
Browse files
Options
Downloads
Patches
Plain Diff
stop auto-slide on pause and overview (closes #320)
parent
380264af
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/reveal.js
+17
-1
17 additions, 1 deletion
js/reveal.js
js/reveal.min.js
+2
-2
2 additions, 2 deletions
js/reveal.min.js
with
19 additions
and
3 deletions
js/reveal.js
+
17
−
1
View file @
2962325f
...
@@ -675,6 +675,9 @@ var Reveal = (function(){
...
@@ -675,6 +675,9 @@ var Reveal = (function(){
// Only proceed if enabled in config
// Only proceed if enabled in config
if
(
config
.
overview
)
{
if
(
config
.
overview
)
{
// Don't auto-slide while in overview mode
cancelAutoSlide
();
var
wasActive
=
dom
.
wrapper
.
classList
.
contains
(
'
overview
'
);
var
wasActive
=
dom
.
wrapper
.
classList
.
contains
(
'
overview
'
);
dom
.
wrapper
.
classList
.
add
(
'
overview
'
);
dom
.
wrapper
.
classList
.
add
(
'
overview
'
);
...
@@ -794,6 +797,8 @@ var Reveal = (function(){
...
@@ -794,6 +797,8 @@ var Reveal = (function(){
slide
(
indexh
,
indexv
);
slide
(
indexh
,
indexv
);
cueAutoSlide
();
// Notify observers of the overview hiding
// Notify observers of the overview hiding
dispatchEvent
(
'
overviewhidden
'
,
{
dispatchEvent
(
'
overviewhidden
'
,
{
'
indexh
'
:
indexh
,
'
indexh
'
:
indexh
,
...
@@ -862,6 +867,7 @@ var Reveal = (function(){
...
@@ -862,6 +867,7 @@ var Reveal = (function(){
*/
*/
function
pause
()
{
function
pause
()
{
cancelAutoSlide
();
dom
.
wrapper
.
classList
.
add
(
'
paused
'
);
dom
.
wrapper
.
classList
.
add
(
'
paused
'
);
}
}
...
@@ -871,6 +877,7 @@ var Reveal = (function(){
...
@@ -871,6 +877,7 @@ var Reveal = (function(){
*/
*/
function
resume
()
{
function
resume
()
{
cueAutoSlide
();
dom
.
wrapper
.
classList
.
remove
(
'
paused
'
);
dom
.
wrapper
.
classList
.
remove
(
'
paused
'
);
}
}
...
@@ -1424,12 +1431,21 @@ var Reveal = (function(){
...
@@ -1424,12 +1431,21 @@ var Reveal = (function(){
clearTimeout
(
autoSlideTimeout
);
clearTimeout
(
autoSlideTimeout
);
// Cue the next auto-slide if enabled
// Cue the next auto-slide if enabled
if
(
autoSlide
)
{
if
(
autoSlide
&&
!
isPaused
()
&&
!
isOverviewActive
()
)
{
autoSlideTimeout
=
setTimeout
(
navigateNext
,
autoSlide
);
autoSlideTimeout
=
setTimeout
(
navigateNext
,
autoSlide
);
}
}
}
}
/**
* Cancels any ongoing request to auto-slide.
*/
function
cancelAutoSlide
()
{
clearTimeout
(
autoSlideTimeout
);
}
function
navigateLeft
()
{
function
navigateLeft
()
{
// Prioritize hiding fragments
// Prioritize hiding fragments
...
...
This diff is collapsed.
Click to expand it.
js/reveal.min.js
+
2
−
2
View file @
2962325f
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment