Skip to content

Commit

Permalink
refactor(geo): review comments and fixing typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pelord committed Nov 28, 2024
1 parent 5dd8d73 commit ab26c79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@
</div>

<div formButtons class="actions-container">
<button
mat-stroked-button
type="button"
color="primary"
(click)="clearForm()"
>
<button mat-stroked-button type="button" color="primary" (click)="clear()">
{{
'igo.geo.workspace.widget.interactiveSelection.reset.button' | translate
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class InteractiveSelectionFormComponent
)
.pipe(pairwise())
.subscribe(([previous, current]) => {
let currentValues = current;
const currentValues = current;
if (previous?.action !== current.action) {
currentValues.buffer = undefined;
}
Expand Down Expand Up @@ -291,8 +291,8 @@ export class InteractiveSelectionFormComponent
})
.filter((f) => f);

let selectedStateToApply: boolean = false;
let exclusive: boolean = false;
let selectedStateToApply = false;
let exclusive = false;
if (intersectingFeatures.length) {
if ([SelectionAction.New, SelectionAction.Add].includes(data.action)) {
selectedStateToApply = true;
Expand All @@ -312,7 +312,9 @@ export class InteractiveSelectionFormComponent
);
}

clearForm() {
clear() {
const featureStore = this.workspace.entityStore as FeatureStore;
featureStore.state.updateAll({ selected: false });
this.form$.value.control.reset();
this.setAction(SelectionAction.Add);
this.data$.next(
Expand Down

0 comments on commit ab26c79

Please sign in to comment.