Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shower-presentation
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
Шардт Максим Александрович
shower-presentation
Commits
09750b07
Commit
09750b07
authored
Jan 20, 2013
by
miripiruni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring: shower.increaseInnerNavigation() returns only Boolean
parent
a06c84a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
shower.js
shower.js
+8
-9
No files found.
shower.js
View file @
09750b07
...
...
@@ -172,8 +172,8 @@ window.shower = (function(window, document, undefined) {
// NOTE: But first of all check if there is no current slide
if
(
-
1
===
currentSlideNumber
||
!
slideList
[
currentSlideNumber
].
hasInnerNavigation
||
-
1
===
shower
.
increaseInnerNavigation
(
currentSlideNumber
)
!
slideList
[
currentSlideNumber
].
hasInnerNavigation
||
!
shower
.
increaseInnerNavigation
(
currentSlideNumber
)
)
{
shower
.
go
(
currentSlideNumber
+
1
);
// slides starts from 0
...
...
@@ -540,12 +540,11 @@ window.shower = (function(window, document, undefined) {
/**
* Increases inner navigation by adding 'active' class to next inactive inner navigation item
* @param {Number} slideNumber
* @returns {
Number
}
* @returns {
Boolean
}
*/
shower
.
increaseInnerNavigation
=
function
(
slideNumber
)
{
var
nextNodes
,
node
,
ret
=
-
1
;
node
;
if
(
!
shower
.
_isNumber
(
slideNumber
))
{
throw
new
Error
(
'Gimme slide number as Number, baby!'
);
...
...
@@ -558,11 +557,11 @@ window.shower = (function(window, document, undefined) {
if
(
0
!==
nextNodes
.
length
)
{
node
=
nextNodes
[
0
];
node
.
classList
.
add
(
'active'
);
ret
=
nextNodes
.
length
-
1
;
ret
urn
true
;
}
}
return
ret
;
return
false
;
};
...
...
@@ -644,8 +643,8 @@ window.shower = (function(window, document, undefined) {
if
(
shower
.
isSlideMode
())
{
// Inner navigation is "completed" if current slide have
// no inner navigation or inner navigation is fully shown
isInnerNavCompleted
=
!
slideList
[
currentSlideNumber
].
hasInnerNavigation
||
-
1
===
shower
.
increaseInnerNavigation
(
currentSlideNumber
);
isInnerNavCompleted
=
!
slideList
[
currentSlideNumber
].
hasInnerNavigation
||
!
shower
.
increaseInnerNavigation
(
currentSlideNumber
);
}
else
{
// Also inner navigation is always "completed" if we are in
// list mode
...
...
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