fix(core): update

This commit is contained in:
2020-05-25 13:18:53 +00:00
parent 6fdf08c8a9
commit 7c9ad26519
7 changed files with 314 additions and 404 deletions

View File

@@ -188,7 +188,7 @@ export class ObjectMap<T> {
}
/**
* returns a new Objectmap that includes
* returns a new Objectmap that includes
*/
public concat(objectMapArg: ObjectMap<T>) {
const concattedObjectMap = new ObjectMap<T>();

View File

@@ -92,15 +92,20 @@ export class Stringmap {
/**
* register a new trigger
*/
public registerUntilTrue(functionArg: ITriggerFunction, doFunctionArg) {
public registerUntilTrue(functionArg: ITriggerFunction, callbackArg?: () => any) {
const trueDeferred = plugins.smartpromise.defer();
this._triggerUntilTrueFunctionArray.push(() => {
const result = functionArg();
if (result === true) {
doFunctionArg();
if (callbackArg) {
callbackArg();
}
trueDeferred.resolve();
}
return result;
});
this.notifyTrigger();
return trueDeferred.promise;
}
/**