diff --git a/src/archive.js b/src/archive.js index c9f332c..76816a0 100644 --- a/src/archive.js +++ b/src/archive.js @@ -38,7 +38,7 @@ class Archive { /** * Open an archive * @param {binary} input - * @param {boolean} isBase64 tells JSZip if the input data is base64 encoded + * @param {boolean} [isBase64] tells JSZip if the input data is base64 encoded * @return {Promise} zipfile */ open(input, isBase64){ @@ -48,7 +48,7 @@ class Archive { /** * Load and Open an archive * @param {string} zipUrl - * @param {boolean} isBase64 tells JSZip if the input data is base64 encoded + * @param {boolean} [isBase64] tells JSZip if the input data is base64 encoded * @return {Promise} zipfile */ openUrl(zipUrl, isBase64){ @@ -62,7 +62,7 @@ class Archive { * Request a url from the archive * @param {string} url a url to request from the archive * @param {string} [type] specify the type of the returned result - * @return {Promise} + * @return {Promise} */ request(url, type){ var deferred = new defer(); diff --git a/src/layout.js b/src/layout.js index 8b0ebec..46cbfc1 100644 --- a/src/layout.js +++ b/src/layout.js @@ -8,7 +8,7 @@ import EventEmitter from "event-emitter"; * @param {object} settings * @param {string} [settings.layout='reflowable'] * @param {string} [settings.spread] - * @param {int} [settings.minSpreadWidth=800] + * @param {number} [settings.minSpreadWidth=800] * @param {boolean} [settings.evenSpreads=false] */ class Layout { @@ -55,6 +55,7 @@ class Layout { /** * Switch the flow between paginated and scrolled * @param {string} flow paginated | scrolled + * @return {string} simplified flow */ flow(flow) { if (typeof(flow) != "undefined") { @@ -74,8 +75,9 @@ class Layout { /** * Switch between using spreads or not, and set the * width at which they switch to single. - * @param {string} spread true | false - * @param {boolean} min integer in pixels + * @param {string} spread "none" | "always" | "auto" + * @param {number} min integer in pixels + * @return {boolean} spread true | false */ spread(spread, min) { @@ -94,9 +96,9 @@ class Layout { /** * Calculate the dimensions of the pagination - * @param {number} _width [description] - * @param {number} _height [description] - * @param {number} _gap [description] + * @param {number} _width width of the rendering + * @param {number} _height height of the rendering + * @param {number} _gap width of the gap between columns */ calculate(_width, _height, _gap){ @@ -231,6 +233,11 @@ class Layout { } + /** + * Update props that have changed + * @private + * @param {object} props + */ update(props) { // Remove props that haven't changed Object.keys(props).forEach((propName) => { diff --git a/src/utils/queue.js b/src/utils/queue.js index f04d2e5..1f8a18a 100644 --- a/src/utils/queue.js +++ b/src/utils/queue.js @@ -181,7 +181,7 @@ class Queue { /** * Get the number of tasks in the queue - * @return {int} tasks + * @return {number} tasks */ length(){ return this._q.length; diff --git a/src/utils/url.js b/src/utils/url.js index e8d1a4d..1c7739f 100644 --- a/src/utils/url.js +++ b/src/utils/url.js @@ -73,6 +73,7 @@ class Url { /** * Resolves a relative path to a absolute url + * @param {string} what * @returns {string} url */ resolve (what) { @@ -89,6 +90,7 @@ class Url { /** * Resolve a path relative to the url + * @param {string} what * @returns {string} path */ relative (what) {