mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#4036 - Kaufoptionen
This commit is contained in:
@@ -43,7 +43,7 @@ export class ScaleContentComponent implements AfterContentInit {
|
||||
|
||||
fontSizeInEm = 1;
|
||||
|
||||
adjustmentSteps = 0.1;
|
||||
adjustmentSteps = 0.05;
|
||||
|
||||
constructor(private _elementRef: ElementRef<HTMLElement>, private _renderer: Renderer2) {}
|
||||
|
||||
@@ -54,10 +54,12 @@ export class ScaleContentComponent implements AfterContentInit {
|
||||
adjustFontSize() {
|
||||
const element = this._elementRef.nativeElement;
|
||||
|
||||
const clientRect = element.getClientRects();
|
||||
const scrollHeight = element.scrollHeight;
|
||||
const clientRect = element?.getClientRects();
|
||||
const scrollHeight = element?.scrollHeight;
|
||||
|
||||
if (clientRect[0].height < scrollHeight) {
|
||||
const domRect = clientRect && clientRect[0];
|
||||
|
||||
if (domRect && domRect?.height < scrollHeight) {
|
||||
this.fontSizeInEm -= this.adjustmentSteps;
|
||||
} else {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user