Merge pull request #30 from brianpooe/claude/angular-signals-upgrade-01LkzyeFbjsqKer2XzATwcxH

Claude/angular signals upgrade 01 lkzye fbjsq ker2 xz a twcx h
This commit is contained in:
Brian Pooe 2025-11-16 19:09:18 +02:00 committed by GitHub
commit 5acaff9a67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View file

@ -381,8 +381,10 @@
[disableZoomControl]="'disable'" [disableZoomControl]="'disable'"
[enableBrightnessControl]="false" [enableBrightnessControl]="false"
[brightnessStep]="0.1" [brightnessStep]="0.1"
[minBrightness]="1.0"
[maxBrightness]="3.0"
[minScale]="1" [minScale]="1"
[limitZoom]="5" [limitZoom]="8"
(zoomChanged)="onCustomZoomChanged($event)" (zoomChanged)="onCustomZoomChanged($event)"
(brightnessChanged)="onCustomBrightnessChanged($event)" (brightnessChanged)="onCustomBrightnessChanged($event)"
> >

View file

@ -30,13 +30,10 @@ export class AppComponent {
private readonly MIN_ZOOM = 1; private readonly MIN_ZOOM = 1;
private readonly ZOOM_STEP = 0.5; private readonly ZOOM_STEP = 0.5;
private readonly MIN_BRIGHTNESS = 1.0; private readonly MIN_BRIGHTNESS = 1.0;
private readonly MAX_BRIGHTNESS = 2.0; private readonly MAX_BRIGHTNESS = 3.0;
// Computed signals for button states // Computed signals for button states
isZoomAtMin = computed(() => { isZoomAtMin = computed(() => this.customZoomState() <= this.MIN_ZOOM);
const zoom = this.customZoomState();
return zoom <= this.MIN_ZOOM + 0.01; // Small tolerance for float comparison
});
isBrightnessAtMin = computed(() => this.customBrightnessState() <= this.MIN_BRIGHTNESS); isBrightnessAtMin = computed(() => this.customBrightnessState() <= this.MIN_BRIGHTNESS);
isBrightnessAtMax = computed(() => this.customBrightnessState() >= this.MAX_BRIGHTNESS); isBrightnessAtMax = computed(() => this.customBrightnessState() >= this.MAX_BRIGHTNESS);