From 455b42aa85226c66dde3b94cdf74de1a6bb1d726 Mon Sep 17 00:00:00 2001 From: j433866 Date: Wed, 3 Jul 2019 11:53:38 +0100 Subject: [PATCH] Fix whitespace and comment typos. Add comment to inputworker default values. --- src/web/waiters/OutputWaiter.mjs | 4 ++-- src/web/waiters/WorkerWaiter.mjs | 2 +- src/web/workers/InputWorker.mjs | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/web/waiters/OutputWaiter.mjs b/src/web/waiters/OutputWaiter.mjs index 26e790bf..bc0e202d 100755 --- a/src/web/waiters/OutputWaiter.mjs +++ b/src/web/waiters/OutputWaiter.mjs @@ -176,7 +176,7 @@ class OutputWaiter { /** * Updates the error value for the output in the output array. - * If this is the active output tab, calls app.handleError. + * If this is the active output tab, calls app.handleError. * Otherwise, the error will be handled when the output is switched to * * @param {Error} error @@ -470,7 +470,7 @@ class OutputWaiter { */ async getDishTitle(dish, maxLength) { return await new Promise(resolve => { - this.manager.worker.getDishTitle(dish, maxLength, r=> { + this.manager.worker.getDishTitle(dish, maxLength, r => { resolve(r.value); }); }); diff --git a/src/web/waiters/WorkerWaiter.mjs b/src/web/waiters/WorkerWaiter.mjs index ab279fca..98e000da 100644 --- a/src/web/waiters/WorkerWaiter.mjs +++ b/src/web/waiters/WorkerWaiter.mjs @@ -275,7 +275,7 @@ class WorkerWaiter { } /** - * Updates the UI to show if baking is in process or not. + * Updates the UI to show if baking is in progress or not. * * @param {boolean} bakingStatus */ diff --git a/src/web/workers/InputWorker.mjs b/src/web/workers/InputWorker.mjs index 63654ddb..17d09b93 100644 --- a/src/web/workers/InputWorker.mjs +++ b/src/web/workers/InputWorker.mjs @@ -10,8 +10,11 @@ import Utils from "../../core/Utils"; import {detectFileType} from "../../core/lib/FileType"; +// Default max values +// These will be correctly calculated automatically self.maxWorkers = 4; self.maxTabs = 1; + self.pendingFiles = []; self.inputs = {}; self.loaderWorkers = []; @@ -250,7 +253,7 @@ self.getInputValue = function(inputNum) { }; /** - * Gets the stored value or oobject for a specific inputNum and sends it to the inputWaiter. + * Gets the stored value or object for a specific inputNum and sends it to the inputWaiter. * * @param {object} inputData - Object containing data about the input to retrieve * @param {number} inputData.inputNum - The inputNum of the input to get