Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/firebird-ng/src/app/services/local-storage.service.ts is written in an unsupported language. File is not indexed.

0001 import { Injectable } from '@angular/core';
0002 import { ConfigProperty } from '../utils/config-property';
0003 
0004 @Injectable({
0005   providedIn: 'root',
0006 })
0007 export class LocalStorageService {
0008   public geometryUrl: ConfigProperty<string>;
0009   public geometryThemeName: ConfigProperty<string>;
0010   public geometryCutListName: ConfigProperty<string>;
0011   public geometryFastAndUgly: ConfigProperty<boolean>;
0012   public geometryRootFilterName: ConfigProperty<string>;
0013   public dexJsonEventSource: ConfigProperty<string>;
0014   public rootEventSource: ConfigProperty<string>;
0015   public rootEventRange: ConfigProperty<string>;
0016   public localServerUseApi: ConfigProperty<boolean>;
0017   public localServerUrl: ConfigProperty<string>;
0018 
0019   public clippingEnabled: ConfigProperty<boolean>;
0020   public clippingStartAngle: ConfigProperty<number>;
0021   public clippingOpeningAngle: ConfigProperty<number>;
0022   public uiSelectedTheme: ConfigProperty<string>;
0023 
0024 
0025   constructor() {
0026     this.geometryUrl = new ConfigProperty('geometry.selectedGeometry', 'https://eic.github.io/epic/artifacts/tgeo/epic_craterlake.root');
0027     this.geometryFastAndUgly = new ConfigProperty('geometry.FastDefaultMaterial', false);
0028     this.geometryCutListName = new ConfigProperty('geometry.cutListName', "central");
0029     this.geometryThemeName = new ConfigProperty('geometry.themeName', "cool2");
0030     this.geometryRootFilterName = new ConfigProperty('geometry.rootFilterName', "default");
0031     this.dexJsonEventSource = new ConfigProperty('events.dexEventsSource', '');
0032     this.rootEventSource = new ConfigProperty('events.rootEventSource', '');
0033     this.rootEventRange = new ConfigProperty('events.rootEventRange', '0-5');
0034     this.localServerUseApi = new ConfigProperty('server.useApi', false);
0035     this.localServerUrl = new ConfigProperty('server.url', 'http://localhost:5454');
0036     this.clippingEnabled = new ConfigProperty<boolean>('geometry.clippingEnabled', true);
0037     this.uiSelectedTheme = new ConfigProperty('ui.theme', 'system', undefined,
0038       /* validator */ (val) => val === 'dark' || val === 'light' || val === 'system'
0039       );
0040 
0041 
0042     this.clippingStartAngle = new ConfigProperty<number>('geometry.clippingStartAngle', 90, undefined,
0043       /* validator */ (val) => val >= 0 && val <= 360 // Provide an optional validator ensuring 0 <= angle <= 360
0044     );
0045 
0046     this.clippingOpeningAngle = new ConfigProperty<number>('clipping.openingAngle', 180, undefined,
0047       /* validator */ (val) => val >= 0 && val <= 360 // Provide an optional validator ensuring 0 <= angle <= 360
0048     );
0049   }
0050 }