diff --git a/rtd_phosphonetx/source/html/demoapp/utilities.js b/rtd_phosphonetx/source/html/demoapp/utilities.js deleted file mode 100644 index 6749d86e933fd1854d4f7da13920d3f37f45f638..0000000000000000000000000000000000000000 --- a/rtd_phosphonetx/source/html/demoapp/utilities.js +++ /dev/null @@ -1,34 +0,0 @@ - - -/** - * A utility class for deferring an action until all of some kind of action has completed - * - * @argument dependencies An array of the keys for the dependencies. - * @class - */ -function ActionDeferrer(pendingAction, dependencies) { - this.pendingAction = pendingAction; - this.dependencies = {}; - var newme = this; - dependencies.forEach(function(key) { - newme.dependencies[key] = false; - }); -} - -/** - * Note that a dependency completed. Execute the pending action if appropriate. - * @method - */ -ActionDeferrer.prototype.dependencyCompleted = function(key) { - this.dependencies[key] = true; - var shouldExecute = true; - for (prop in this.dependencies) { - if (false == this.dependencies[prop]) { - shouldExecute = false; - break; - } - } - if (shouldExecute) { - this.pendingAction(); - } -}