AtomOnce will execute given method only once and it will prevent recursive calls.
This is important when you want to update source and destination and prevent recursive calls.
AtomOnce will execute given method only once and it will prevent recursive calls.
This is important when you want to update source and destination and prevent recursive calls.
AtomOnce will execute given method only once and it will prevent recursive calls. This is important when you want to update source and destination and prevent recursive calls.
private valueOnce: AtomOnce = new AtomOnce(); private onValueChanged(): void { valueOnce.run(()=> { this.value = compute(this.target); }); } private onTargetChanged(): void { valueOnce.run(() => { this.target = computeInverse(this.value); }); }