Skip to content

Commit

Permalink
try fix: 字体大小的变更不能保留
Browse files Browse the repository at this point in the history
  • Loading branch information
elpwc committed Jul 12, 2024
1 parent 1afd84c commit 15e1e9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/MapView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@
return f !== '' && f !== undefined;
});
}
if (getCookie('markerfontsize')) {
markerFontSize = Number(getCookie('markerfontsize'));
}
// 初始化是否显示地名,zoom过小就不显示了,不然嫩卡
if (initZoom > 3) {
Expand Down Expand Up @@ -1449,6 +1452,7 @@
class={markerFontSize === 0.8 && 'checked'}
on:click={() => {
markerFontSize = 0.8;
setCookie('markerfontsize', markerFontSize);
updateShowingMarkers();
}}
>
Expand All @@ -1459,6 +1463,7 @@
class={markerFontSize === 1.0 && 'checked'}
on:click={() => {
markerFontSize = 1.0;
setCookie('markerfontsize', markerFontSize);
updateShowingMarkers();
}}
>
Expand All @@ -1469,6 +1474,7 @@
class={markerFontSize === 1.3 && 'checked'}
on:click={() => {
markerFontSize = 1.3;
setCookie('markerfontsize', markerFontSize);
updateShowingMarkers();
}}
>
Expand Down

0 comments on commit 15e1e9d

Please sign in to comment.