Skip to content

Commit

Permalink
improve mobile stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhorner committed Sep 19, 2024
1 parent ce17a78 commit f9a8d36
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/frontend/src/lib/components/TrackExplorerMap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Control,
ControlButton,
ControlGroup,
AttributionControl,
} from "svelte-maplibre"
import TrackSelector from "./TrackSelector.svelte"
import bbox from "@turf/bbox"
Expand Down Expand Up @@ -49,6 +50,7 @@
bind:map
style="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
class="full-map"
attributionControl={false}
>
<Control position="top-left">
<GoToCoordsControl />
Expand Down
4 changes: 4 additions & 0 deletions packages/frontend/src/lib/components/TrackInfo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
padding-right: 10px;
}
td {
word-break: break-all;
}
button {
background-color: revert !important;
}
Expand Down
12 changes: 10 additions & 2 deletions packages/frontend/src/lib/components/TrackViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
</Control>
{/if}

<Control position="bottom-right">
<Control class="track-info-control" position="bottom-right">
<div class="control-group" transition:fly={{ x: "100%" }}>
<TrackInfo {track} />
</div>
Expand Down Expand Up @@ -212,8 +212,16 @@
}
@media (max-width: 600px) {
:global(.image-control) {
.control-group {
border-radius: 0;
}
:global(.image-control, .track-info-control) {
margin: 0 !important;
}
:global(.maplibregl-ctrl-bottom-right) {
z-index: 1;
}
}
</style>

0 comments on commit f9a8d36

Please sign in to comment.