From dfaa6470c1290fc0b5aea494a4840322364ba262 Mon Sep 17 00:00:00 2001 From: miripiruni Date: Fri, 3 May 2013 20:41:13 +0400 Subject: [PATCH] Slide constructor: added JSDoc --- shower.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/shower.js b/shower.js index 7aa0c02..18c20df 100755 --- a/shower.js +++ b/shower.js @@ -12,7 +12,18 @@ window.shower = window.shower || (function(window, document, undefined) { timer, isHistoryApiSupported = !!(window.history && window.history.pushState); - + /** + * Slide constructor + * + * @param {Object} opts + * @param {String} opts.id html id attribute or automaticaly assigned order number + * @param {Number} opts.number slide number + * @param {Boolean} opts.hasInnerNavigation + * @param {Number} [opts.timing] + * @param {Number} [opts.innerLength] + * @param {Number} [opts.innerComplete = 0] + * @constructor + */ function Slide(opts) { for (var prop in opts) { if (opts.hasOwnProperty(prop)) { @@ -197,7 +208,7 @@ window.shower = window.shower || (function(window, document, undefined) { id : slides[i].id, number : i, hasInnerNavigation : null !== slides[i].querySelector('.next'), - timing : timing, + timing : parseInt(timing, 10) || undefined, innerLength : slides[i].querySelectorAll('.next').length, innerComplete : 0 }));