diff --git a/src/app/services/app-setup/app-setup.service.ts b/src/app/services/app-setup/app-setup.service.ts index 16a9ef5dec88202e522f0147d92c1e0a3442209f..9c24f2d1131c05fdd11e14ad8d8e13fc199cf59d 100644 --- a/src/app/services/app-setup/app-setup.service.ts +++ b/src/app/services/app-setup/app-setup.service.ts @@ -1,45 +1,14 @@ +/** + * Stores app preferences + * @TODO save in cookie / localStorage ? + */ export class ApplicationSetupService { - private _displayPrecision: number; - private _computePrecision: number; - - private _newtonMaxIter: number; - - constructor() { - this.defaults(); - } - - public defaults() { - this._displayPrecision = 0.001; - this._computePrecision = 0.0001; - this._newtonMaxIter = 50; - } - - public get displayPrecision() { - return this._displayPrecision; - } - - public set displayPrecision(p: number) { - this._displayPrecision = p; - } + public displayPrecision = 0.001; + public computePrecision = 0.0001; + public newtonMaxIter = 50; public get displayDigits() { - return -Math.log10(this._displayPrecision); - } - - public get computePrecision() { - return this._computePrecision; - } - - public set computePrecision(p: number) { - this._computePrecision = p; - } - - public get newtonMaxIter() { - return this._newtonMaxIter; - } - - public set newtonMaxIter(p: number) { - this._newtonMaxIter = p; + return -Math.log10(this.displayPrecision); } }