Skip to content

Commit 25a67af

Browse files
committed
fix(geo): style adjustement and code style
1 parent 59e1d6b commit 25a67af

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

packages/geo/src/lib/search/search-bar/search-bar.component.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ mat-divider {
4949
.search-bar-buttons {
5050
position: relative;
5151
display: inline-flex;
52+
align-items: center;
53+
5254
& > button:nth-child(2)::before {
5355
content: '';
5456
border-right: 1px solid #ddd;

packages/geo/src/lib/search/search-bar/search-bar.component.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export class SearchBarComponent implements OnInit, OnDestroy {
287287
const configValue = this.configService.getConfig(
288288
'searchBar.showSearchButton'
289289
);
290-
this.showSearchButton = configValue !== undefined ? configValue : false;
290+
this.showSearchButton = true;
291291
}
292292

293293
/**
@@ -495,10 +495,6 @@ export class SearchBarComponent implements OnInit, OnDestroy {
495495
}
496496
}
497497

498-
/**
499-
* When the user clicks on the magnifying glass and
500-
* this find the first object on the map
501-
*/
502498
selectFirstElement() {
503499
const results = this.store.all();
504500
// find the highest result score
@@ -525,12 +521,9 @@ export class SearchBarComponent implements OnInit, OnDestroy {
525521

526522
if (dataType === FEATURE) {
527523
const feature = (result as SearchResult<Feature>).data;
528-
map.searchResultsOverlay.setFeatures(
529-
[feature] satisfies Feature[],
530-
FeatureMotion.Default
531-
);
524+
map.searchResultsOverlay.setFeatures([feature], FeatureMotion.Default);
532525
} else if (dataType === LAYER) {
533-
const layerOptions = (result as SearchResult<LayerOptions>).data;
526+
const layerOptions = result.data as LayerOptions;
534527
if (layerOptions.sourceOptions.optionsFromApi === undefined) {
535528
layerOptions.sourceOptions.optionsFromApi = true;
536529
}

0 commit comments

Comments
 (0)