@regionerne/gis-komponent 0.0.50 → 0.0.51

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.
@@ -3630,6 +3630,7 @@ class ToolboxComponent {
3630
3630
  if (!this.collapsed && this.profile.toolboxInitialPosition.includes('højre')) {
3631
3631
  this._layoutService.bringElementIntoViewIfNeeded('.toolbox-wrapper', -30, this.collapsed);
3632
3632
  }
3633
+ this._loadDefaultToolIfNeeded();
3633
3634
  }
3634
3635
  }
3635
3636
  startDownloadCasdatres() {
@@ -3638,6 +3639,55 @@ class ToolboxComponent {
3638
3639
  startDownloadAddresses() {
3639
3640
  this._startDownload('address');
3640
3641
  }
3642
+ _loadDefaultToolIfNeeded() {
3643
+ if (this.profile && this.profile.defaultTool) {
3644
+ switch (this.profile.defaultTool) {
3645
+ case 'Vis info om geometri':
3646
+ this.toggleShowInfo();
3647
+ return;
3648
+ case 'Download addresser':
3649
+ this.startDownloadAddresses();
3650
+ return;
3651
+ case 'Download matrikler':
3652
+ this.startDownloadCasdatres();
3653
+ return;
3654
+ case 'Søg punkt / polygon':
3655
+ this.togglePointPolygonSearch();
3656
+ return;
3657
+ case 'Dokument fra punkt':
3658
+ this.startDocumentPointSearch();
3659
+ return;
3660
+ case 'Dokumenter fra polygon':
3661
+ this.startDocumentPolygonSearch();
3662
+ return;
3663
+ case 'Fremhæv aktivt objekt i listen':
3664
+ this.startSelectFeatureHighlight();
3665
+ return;
3666
+ case 'Indsæt eller flyt punkter i flade':
3667
+ this.startEdit();
3668
+ return;
3669
+ case 'Skift status på element':
3670
+ this.startChangeType();
3671
+ return;
3672
+ case 'Sæt centerpunkt':
3673
+ this.setCenterPoint();
3674
+ return;
3675
+ case 'Vælg og vis emner i listen':
3676
+ this.toggleFeatureSearch();
3677
+ return;
3678
+ case 'Tegn element':
3679
+ this.startDraw();
3680
+ return;
3681
+ case 'Indsæt WKT streng for at importere elementet':
3682
+ this.activateShowInputWKT();
3683
+ return;
3684
+ case 'Mål afstand / areal':
3685
+ this.toggleMeasure();
3686
+ return;
3687
+ default: return; // do nothing
3688
+ }
3689
+ }
3690
+ }
3641
3691
  _startDownload(downloadType) {
3642
3692
  this._clearAllInteractions();
3643
3693
  this.activeMode = downloadType === 'address' ? 'download-addresses' : 'download-cadastres';