Bladeren bron

👽️ update blur range

jmacura 3 jaren geleden
bovenliggende
commit
15112ef8e6
2 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 1 1
      src/app/calculator/calculator.component.html
  2. 3 1
      src/app/calculator/calculator.service.ts

+ 1 - 1
src/app/calculator/calculator.component.html

@@ -37,7 +37,7 @@
       </div>
       <div>
         {{ 'CALCULATOR.selectBlur' | translate}}:&emsp;{{calcService.blurValue}}
-        <input type="range" min="0" max="1" step="0.1" [(ngModel)]="calcService.blurValue">
+        <input type="range" min="{{calcService.BLUR_MIN_VALUE}}" max="{{calcService.BLUR_MAX_VALUE}}" step="1" [(ngModel)]="calcService.blurValue">
       </div>
       <div>
         {{ 'CALCULATOR.selectIndex' | translate}}:&emsp;

+ 3 - 1
src/app/calculator/calculator.service.ts

@@ -13,9 +13,11 @@ export type Index = 'EVI' | 'RVI4S1';
 @Injectable({providedIn: 'root'})
 export class CalculatorService {
   AVAILABLE_PRODUCTS = ['EVI', 'RVI4S1'] as const;
+  BLUR_MIN_VALUE = 0 as const;
+  BLUR_MAX_VALUE = 5 as const;
   SERVICE_BASE_URL = 'https://fieldcalc.lesprojekt.cz/' as const;
   availableDates: Array<string>;
-  blurValue = 0.4;
+  blurValue = 0;
   dateRangeSelects: Subject<{date: string}> = new Subject();
   dateCalendarSelects: Subject<{date: string}> = new Subject();
   lpisLoading = false;