style: run prettier
This commit is contained in:
@ -84,21 +84,25 @@
|
|||||||
$effect(() => {
|
$effect(() => {
|
||||||
const fullHeight = window.innerHeight - 20 - 40 - 10;
|
const fullHeight = window.innerHeight - 20 - 40 - 10;
|
||||||
if (fullscreen[view.current.type]) {
|
if (fullscreen[view.current.type]) {
|
||||||
if(sidebarHeight != fullHeight) {
|
if (sidebarHeight != fullHeight) {
|
||||||
if(window.innerWidth < 768) {
|
if (window.innerWidth < 768) {
|
||||||
hideSearch = true;
|
hideSearch = true;
|
||||||
map.ignorePadding = true;
|
map.ignorePadding = true;
|
||||||
}
|
}
|
||||||
previousHeight = sidebarHeight;
|
previousHeight = sidebarHeight;
|
||||||
sidebarHeight = fullHeight;
|
sidebarHeight = fullHeight;
|
||||||
requestAnimationFrame(() => { map.updateMapPadding(); } );
|
requestAnimationFrame(() => {
|
||||||
|
map.updateMapPadding();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hideSearch = false;
|
hideSearch = false;
|
||||||
if(sidebarHeight == fullHeight) {
|
if (sidebarHeight == fullHeight) {
|
||||||
map.ignorePadding = false;
|
map.ignorePadding = false;
|
||||||
sidebarHeight = previousHeight;
|
sidebarHeight = previousHeight;
|
||||||
requestAnimationFrame(() => { map.updateMapPadding(); } );
|
requestAnimationFrame(() => {
|
||||||
|
map.updateMapPadding();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -10,7 +10,10 @@ export const map = $state({
|
|||||||
zoom: 0,
|
zoom: 0,
|
||||||
ignorePadding: false,
|
ignorePadding: false,
|
||||||
updateMapPadding: () => {
|
updateMapPadding: () => {
|
||||||
if (document.querySelector<HTMLDivElement>("#sidebar") == null || map.ignorePadding) {
|
if (
|
||||||
|
document.querySelector<HTMLDivElement>("#sidebar") == null ||
|
||||||
|
map.ignorePadding
|
||||||
|
) {
|
||||||
map._setPadding({
|
map._setPadding({
|
||||||
top: 0,
|
top: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { BriefcaseIcon, DownloadIcon, HomeIcon, SchoolIcon } from "@lucide/svelte";
|
import {
|
||||||
|
BriefcaseIcon,
|
||||||
|
DownloadIcon,
|
||||||
|
HomeIcon,
|
||||||
|
SchoolIcon,
|
||||||
|
} from "@lucide/svelte";
|
||||||
import { Button } from "../../ui/button";
|
import { Button } from "../../ui/button";
|
||||||
import { fly } from "svelte/transition";
|
import { fly } from "svelte/transition";
|
||||||
import { circInOut } from "svelte/easing";
|
import { circInOut } from "svelte/easing";
|
||||||
@ -108,11 +113,7 @@
|
|||||||
{m["sidebar.main.download-app.description"]()}
|
{m["sidebar.main.download-app.description"]()}
|
||||||
</Card.Content>
|
</Card.Content>
|
||||||
<Card.Footer>
|
<Card.Footer>
|
||||||
<a
|
<a href="/trafficcue.apk" target="_blank" rel="noopener noreferrer">
|
||||||
href="/trafficcue.apk"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
<Button>
|
<Button>
|
||||||
<DownloadIcon />
|
<DownloadIcon />
|
||||||
{m["sidebar.main.download-app.button"]()}
|
{m["sidebar.main.download-app.button"]()}
|
||||||
|
|||||||
Reference in New Issue
Block a user