@trap_stevo/legendarybuilderproreact-ui
Version:
The legendary UI & utility API that makes your application a legendary application. ~ Created by Steven Compton
28 lines • 1.06 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import * as React from "react";
import { Debounce } from "./HUDUniversalHUDUtilityManager.js";
var processingOperations = new Map();
var HUDOperationsUtilityManager = /*#__PURE__*/function () {
function HUDOperationsUtilityManager() {
_classCallCheck(this, HUDOperationsUtilityManager);
}
_createClass(HUDOperationsUtilityManager, null, [{
key: "checkOperation",
value: function checkOperation(operationID) {
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
if (processingOperations.get(operationID)) {
return true;
}
processingOperations.set(operationID, true);
var operationDebounce = Debounce(function () {
processingOperations["delete"](operationID);
}, duration);
operationDebounce();
return false;
}
}]);
return HUDOperationsUtilityManager;
}();
;
export default HUDOperationsUtilityManager;