Skip to content

Commit

Permalink
feat: Remove attribution from map screenshots
Browse files Browse the repository at this point in the history
...as it can cover half of the map in the dashboard view.
  • Loading branch information
bprusinowski committed Dec 5, 2024
1 parent ae9492d commit e9dba7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/components/chart-shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ const useModifyNode = () => {
await new Promise((resolve) => setTimeout(resolve, 0));
}

// Remove some elements that should not be included in the screenshot.
// For maps, we can't apply custom classes to internal elements, so we need
// to remove them here.
clonedNode.querySelector(".maplibregl-ctrl")?.remove();

// Every text element should be dark-grey (currently we use primary.main to
// indicate interactive elements, which doesn't make sense for screenshots)
// and not have underlines.
Expand Down

0 comments on commit e9dba7b

Please sign in to comment.