Skip to content

Commit

Permalink
Increase font size of text and remove data layer duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcth committed Jan 30, 2024
1 parent a4073b8 commit bbb884c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
31 changes: 28 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,37 @@ export function App() {
pointType: "text",
// @ts-ignore
getText: (f) => f.properties.textstrang,
getTextSize: 12,
getTextSize: (f: any) => {
switch (f.properties.textstorleksklass) {
case "10":
return 14;
case "9":
return 14;
case "8":
return 14;
case "7":
return 14;
case "6":
return 12;
case "5":
return 12;
case "4":
return 12;
case "3":
return 10;
case "2":
return 10;
case "1":
return 10;
default:
return 10;
}
},
textCharacterSet: "auto",
textFontFamily: "Helvetica",
getTextColor: [0, 0, 0],
textOutlineColor: [255, 255, 255, 200],
textOutlineWidth: 10,
textOutlineColor: [255, 255, 255, 255],
textOutlineWidth: 4,
textFontSettings: { sdf: true },
}),
);
Expand Down
4 changes: 2 additions & 2 deletions src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ export function Header() {
</Tabs.List>
<Tabs.Content value="vader">
<ScrollArea scrollbars="vertical" style={{ height: 270 }}>
<Box style={{ padding: "0 10px" }}>{communicationList}</Box>
<Box style={{ padding: "0 10px" }}>{}</Box>
</ScrollArea>
</Tabs.Content>
<Tabs.Content value="vatten">
<ScrollArea scrollbars="vertical" style={{ height: 270 }}>
<Box style={{ padding: "0 10px" }}>{communicationList}</Box>
<Box style={{ padding: "0 10px" }}>{}</Box>
</ScrollArea>
</Tabs.Content>
</Tabs.Root>
Expand Down

0 comments on commit bbb884c

Please sign in to comment.