Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
my-cucumbers-ru-github-io
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Лотуга Данила Сергеевич
my-cucumbers-ru-github-io
Commits
8c085b88
Commit
8c085b88
authored
Mar 01, 2012
by
Oleg Roschupkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for slide transition (Issue #59).
parent
abbb7c28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
script.js
scripts/script.js
+21
-0
No files found.
scripts/script.js
View file @
8c085b88
...
@@ -88,6 +88,26 @@
...
@@ -88,6 +88,26 @@
progress
.
style
.
width
=
(
100
/
(
slideList
.
length
-
1
)
*
normalizeSlideNumber
(
slideNumber
)).
toFixed
(
2
)
+
'%'
;
progress
.
style
.
width
=
(
100
/
(
slideList
.
length
-
1
)
*
normalizeSlideNumber
(
slideNumber
)).
toFixed
(
2
)
+
'%'
;
}
}
function
updateCurrentAndPassedSlides
(
slideNumber
)
{
var
i
,
l
=
slideList
.
length
,
slide
;
slideNumber
=
normalizeSlideNumber
(
slideNumber
);
for
(
i
=
0
;
i
<
l
;
++
i
)
{
slide
=
document
.
getElementById
(
slideList
[
i
].
id
);
if
(
i
<
slideNumber
)
{
slide
.
classList
.
remove
(
'current'
);
slide
.
classList
.
add
(
'passed'
);
}
else
if
(
i
>
slideNumber
)
{
slide
.
classList
.
remove
(
'passed'
);
slide
.
classList
.
remove
(
'current'
);
}
else
{
slide
.
classList
.
remove
(
'passed'
);
slide
.
classList
.
add
(
'current'
);
}
}
}
function
getSlideHash
(
slideNumber
)
{
function
getSlideHash
(
slideNumber
)
{
return
'#'
+
slideList
[
normalizeSlideNumber
(
slideNumber
)].
id
;
return
'#'
+
slideList
[
normalizeSlideNumber
(
slideNumber
)].
id
;
}
}
...
@@ -97,6 +117,7 @@
...
@@ -97,6 +117,7 @@
if
(
!
isListMode
())
{
if
(
!
isListMode
())
{
updateProgress
(
slideNumber
);
updateProgress
(
slideNumber
);
updateCurrentAndPassedSlides
(
slideNumber
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment