fabrikantencore 2.40.5 → 2.40.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19467,9 +19467,12 @@ class SVGService {
19467
19467
  FabrikantenService;
19468
19468
  ViewerWidth = 101;
19469
19469
  ViewerHeight = 101;
19470
+ LoadedViewerWidth = 0;
19471
+ LoadedViewerHeight = 0;
19470
19472
  Schaal = "2";
19471
19473
  Snede = "";
19472
19474
  Snedes = new Array();
19475
+ MinHeight = 0;
19473
19476
  MinDif = 100;
19474
19477
  ShouldTriggerReload = false;
19475
19478
  constructor(FabrikantenApiClient, sanitization) {
@@ -19498,6 +19501,8 @@ class SVGService {
19498
19501
  this.FabrikantenSVGViewModel = model;
19499
19502
  this.SafeURL = this.sanitization.bypassSecurityTrustResourceUrl(this.FabrikantenSVGViewModel.svg + "");
19500
19503
  this.SafeURLLoaded = true;
19504
+ this.LoadedViewerWidth = request.width;
19505
+ this.LoadedViewerHeight = request.height;
19501
19506
  this.CollectSnedes();
19502
19507
  this.LoadingSignal.set(false);
19503
19508
  ChangeDetectorRef.detectChanges();
@@ -19526,7 +19531,11 @@ class SVGService {
19526
19531
  if (((Math.abs(this.ViewerWidth - width) > this.MinDif) || (Math.abs(this.ViewerHeight - height) > this.MinDif)) && (width > 0) && (height > 0)) {
19527
19532
  this.ViewerWidth = width;
19528
19533
  this.ViewerHeight = height;
19529
- if (this.FabrikantenService?.FabrikantenViewModel?.sessionId != null) {
19534
+ if (this.ViewerHeight < this.MinHeight) {
19535
+ this.ViewerHeight = this.MinHeight;
19536
+ }
19537
+ if (this.FabrikantenService?.FabrikantenViewModel?.sessionId != null &&
19538
+ !this.IsLoadedSizesSame()) {
19530
19539
  this.LoadFabrikantenSVGViewModel(this.FabrikantenService.FabrikantenViewModel.sessionId, ChangeDetectorRef);
19531
19540
  }
19532
19541
  }
@@ -19537,6 +19546,12 @@ class SVGService {
19537
19546
  }
19538
19547
  return false;
19539
19548
  }
19549
+ IsLoadedSizesSame() {
19550
+ if (this.LoadedViewerWidth != this.ViewerWidth || this.LoadedViewerHeight != this.ViewerHeight) {
19551
+ return false;
19552
+ }
19553
+ return true;
19554
+ }
19540
19555
  CollectSnedes() {
19541
19556
  if (this.FabrikantenSVGViewModel?.snedes != null) {
19542
19557
  this.Snedes = this.FabrikantenSVGViewModel.snedes.split("|");