Commit 78327bf4 authored by Vadim Makeev's avatar Vadim Makeev

Merge pull request #109 from miripiruni/master

Fix for #90 + Small JSDoc changes
parents 7e367d8e 37ffb1ea
...@@ -71,7 +71,7 @@ window.shower = (function(window, document, undefined) { ...@@ -71,7 +71,7 @@ window.shower = (function(window, document, undefined) {
/** /**
* Check if arg is number. * Check if arg is number.
* @private * @private
* @param {Number|whatelse} arg Any type * @param {String|Number} arg
* @returns {Boolean} * @returns {Boolean}
*/ */
shower._isNumber = function(arg) { shower._isNumber = function(arg) {
...@@ -165,7 +165,7 @@ window.shower = (function(window, document, undefined) { ...@@ -165,7 +165,7 @@ window.shower = (function(window, document, undefined) {
*/ */
shower.next = function(callback) { shower.next = function(callback) {
var currentSlideNumber = shower.getCurrentSlideNumber(), var currentSlideNumber = shower.getCurrentSlideNumber(),
ret; ret = false;
// Only go to next slide if current slide have no inner // Only go to next slide if current slide have no inner
// navigation or inner navigation is fully shown // navigation or inner navigation is fully shown
...@@ -182,8 +182,6 @@ window.shower = (function(window, document, undefined) { ...@@ -182,8 +182,6 @@ window.shower = (function(window, document, undefined) {
if (typeof(callback) === 'function') { if (typeof(callback) === 'function') {
callback(); callback();
} }
} else {
ret = false;
} }
return ret; return ret;
...@@ -197,7 +195,7 @@ window.shower = (function(window, document, undefined) { ...@@ -197,7 +195,7 @@ window.shower = (function(window, document, undefined) {
*/ */
shower.previous = function(callback) { shower.previous = function(callback) {
var currentSlideNumber = shower.getCurrentSlideNumber(), var currentSlideNumber = shower.getCurrentSlideNumber(),
ret; ret = false;
// slides starts from 0 // slides starts from 0
if (currentSlideNumber > 0) { if (currentSlideNumber > 0) {
...@@ -207,8 +205,6 @@ window.shower = (function(window, document, undefined) { ...@@ -207,8 +205,6 @@ window.shower = (function(window, document, undefined) {
if (typeof(callback) === 'function') { if (typeof(callback) === 'function') {
callback(); callback();
} }
} else {
ret = false;
} }
return ret; return ret;
...@@ -242,7 +238,7 @@ window.shower = (function(window, document, undefined) { ...@@ -242,7 +238,7 @@ window.shower = (function(window, document, undefined) {
/** /**
* Switch to slide view. * Switch to slide view.
* @param {Function} [callback] runs only if shower.enterSlideMode() complete successfully * @param {Function} [callback] runs only if shower.enterSlideMode() complete successfully
* @returns {Number|Boolean} * @returns {Boolean}
*/ */
shower.enterSlideMode = function(callback) { shower.enterSlideMode = function(callback) {
var currentSlideNumber = shower.getCurrentSlideNumber(); var currentSlideNumber = shower.getCurrentSlideNumber();
...@@ -574,7 +570,7 @@ window.shower = (function(window, document, undefined) { ...@@ -574,7 +570,7 @@ window.shower = (function(window, document, undefined) {
// Event handlers // Event handlers
window.addEventListener('DOMContentLoaded', function() { window.addEventListener('DOMContentLoaded', function() {
if (shower.isSlideMode()) { if (body.classList.contains('full')) {
shower.enterSlideMode(); shower.enterSlideMode();
} }
}, false); }, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment