@regionerne/gis-komponent 0.0.111 → 0.0.113

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.
@@ -2197,6 +2197,7 @@ class MergeFeaturesService {
2197
2197
  this._selectedMergeFeature?.setGeometry(overlapResult[0].getGeometry());
2198
2198
  const mergedFeature = evt.selected[0].clone();
2199
2199
  mergedFeature.setGeometry(overlapResult[0].getGeometry());
2200
+ mergedFeature.setStyle(this._selectedMergeFeature?.getStyle());
2200
2201
  this._featureHelper.setId(mergedFeature);
2201
2202
  this._drawLayerService.source.addFeature(mergedFeature);
2202
2203
  this._undoRedoService.addStep();
@@ -3195,6 +3196,11 @@ class ToolboxComponent {
3195
3196
  selectedDocumentSearchMode = 'document-search-by-point';
3196
3197
  activateShowInputWKT() {
3197
3198
  this._clearAllInteractions();
3199
+ if (this.activeMode === 'wkt-input') {
3200
+ this.activeMode = null;
3201
+ this.showInputWKT = false;
3202
+ return;
3203
+ }
3198
3204
  this.showInputWKT = true;
3199
3205
  this.activeMode = 'wkt-input';
3200
3206
  this._active = 'No';
@@ -3743,6 +3749,10 @@ class ToolboxComponent {
3743
3749
  _actionSource = new VectorSource();
3744
3750
  clipHole() {
3745
3751
  this._clearAllInteractions();
3752
+ if (this.activeMode === 'clip-hole') {
3753
+ this.activeMode = null;
3754
+ return;
3755
+ }
3746
3756
  this.activeMode = 'clip-hole';
3747
3757
  const clipHoleDraw = new Draw({
3748
3758
  source: this._actionSource,
@@ -3826,6 +3836,10 @@ class ToolboxComponent {
3826
3836
  }
3827
3837
  split() {
3828
3838
  this._clearAllInteractions();
3839
+ if (this.activeMode === 'split') {
3840
+ this.activeMode = null;
3841
+ return;
3842
+ }
3829
3843
  this.activeMode = 'split';
3830
3844
  const splitInteraction = new Draw({
3831
3845
  type: 'LineString',
@@ -3907,6 +3921,11 @@ class ToolboxComponent {
3907
3921
  return this._deleteSelect;
3908
3922
  }
3909
3923
  startDelete() {
3924
+ if (this.activeMode === 'delete') {
3925
+ this.activeMode = null;
3926
+ this._clearAllInteractions();
3927
+ return;
3928
+ }
3910
3929
  this._clearAllInteractions();
3911
3930
  this.activeMode = 'delete';
3912
3931
  this.map.addInteraction(this.deleteSelect);
@@ -4377,7 +4396,7 @@ class ToolboxComponent {
4377
4396
  ngOnInit() {
4378
4397
  this._originalMapHeight = this.map.getSize()[1];
4379
4398
  this._originalMapWidth = this.map.getSize()[0];
4380
- this.bufferInMeters = this.settings.defaultBufferInMeters ?? 0.2;
4399
+ this.bufferInMeters = this.settings.defaultBufferInMeters ?? -0.2;
4381
4400
  this._resizeSubscription = this._layoutService.mapResizedSubject.subscribe(async () => {
4382
4401
  this.dragPosition = await this._layoutService.keepWidgetInViewPort(this.dragPosition, this._POSITION_STORAGE_KEY, this.collapsed ? WidgetConstants.collapsedHeight : WidgetConstants.toolboxHeight, this.collapsed ? WidgetConstants.collapsedWidth : WidgetConstants.toolboxWidth);
4383
4402
  });
@@ -4577,6 +4596,10 @@ class ToolboxComponent {
4577
4596
  }
4578
4597
  startMergeFeatures() {
4579
4598
  this._clearAllInteractions();
4599
+ if (this.activeMode === 'merge-features') {
4600
+ this.activeMode = null;
4601
+ return;
4602
+ }
4580
4603
  this.activeMode = 'merge-features';
4581
4604
  this._mergeService.startMerge(this.selectedDrawItem.typeId, () => { this.activeMode = null; });
4582
4605
  }
@@ -4984,7 +5007,9 @@ class ActiveObjectsComponent {
4984
5007
  feature: f,
4985
5008
  id: f.getId()
4986
5009
  }));
4987
- this.runConflictAnalysis();
5010
+ if (this._current.gisKomponentSettings.containsCheck?.enabled) {
5011
+ this._runConflictAnalysis();
5012
+ }
4988
5013
  }
4989
5014
  });
4990
5015
  this._featuresForHighlight$.subscribe({
@@ -5029,7 +5054,7 @@ class ActiveObjectsComponent {
5029
5054
  endSession() {
5030
5055
  this.sessionDone.emit();
5031
5056
  }
5032
- runConflictAnalysis() {
5057
+ _runConflictAnalysis() {
5033
5058
  const unlockedFeatures = this.activeFeatures.filter(f => !f.locked);
5034
5059
  const conflictSearches$ = unlockedFeatures.map(f => this._conflictService.search(f.feature.getGeometry(), 1));
5035
5060
  combineLatest(conflictSearches$).subscribe({