Skip to content

Commit 9d63171

Browse files
authored
Merge pull request #68 from Hoff97/develop
One more fix
2 parents 005e1b9 + 2d2a32d commit 9d63171

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

frontend/src/App.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
.offlineButton {
4747
top: 10px;
48-
left: 225px;
48+
left: 255px;
4949
white-space: nowrap;
5050
}
5151

frontend/src/components/SearchComponent.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ interface SearchComponentProps {
1919
pathAndNode: PathAndNode;
2020
}
2121

22+
function abortableClassList(e: any) {
23+
return "classList" in e && (e.classList.contains("locationButton") || e.classList.contains("bp5-input") || e.classList.contains("offlineButton"));
24+
}
25+
2226
function abortEvent(e: LeafletMouseEvent) {
23-
return ("classList" in (e.originalEvent.target as any) &&
24-
((e.originalEvent.target as any).classList.contains("locationButton") || (e.originalEvent.target as any).classList.contains("bp5-input")))
25-
|| ("parentElement" in (e.originalEvent.target as any) && "classList" in (e.originalEvent.target as any).parentElement &&
26-
(e.originalEvent.target as any).parentElement.classList.contains("locationButton"));
27+
return abortableClassList(e.originalEvent.target) ||
28+
("parentElement" in (e.originalEvent.target as any) && abortableClassList((e.originalEvent.target as any).parentElement));
2729
}
2830

2931
function doHoverSearch(grid: GridState, hoverState: HoverState, imageState: ImageState | undefined, settings: Settings, useTimer = true) {

0 commit comments

Comments
 (0)