fix: copilot review

This commit is contained in:
Marc Emmanuel 2026-02-02 08:34:01 +01:00
parent 49160b9cc7
commit eb4ad86664
2 changed files with 4 additions and 5 deletions

View file

@ -4,10 +4,6 @@ import { clipPoly, round } from "../utils";
declare global {
var drawFeatures: () => void;
var defs: d3.Selection<SVGDefsElement, unknown, null, undefined>;
var coastline: d3.Selection<SVGGElement, unknown, null, undefined>;
var lakes: d3.Selection<SVGGElement, unknown, null, undefined>;
var simplify: (
points: [number, number][],
tolerance: number,
@ -95,7 +91,7 @@ function getFeaturePath(feature: PackedGraphFeature): string {
}
const simplifiedPoints = simplify(points, 0.3);
const clippedPoints = clipPoly(simplifiedPoints, graphWidth, graphHeight);
const clippedPoints = clipPoly(simplifiedPoints, graphWidth, graphHeight, 1);
const lineGen = line().curve(curveBasisClosed);
const path = `${round(lineGen(clippedPoints) || "")}Z`;

View file

@ -42,6 +42,9 @@ declare global {
var terrs: Selection<SVGGElement, unknown, null, undefined>;
var temperature: Selection<SVGGElement, unknown, null, undefined>;
var markers: Selection<SVGGElement, unknown, null, undefined>;
var defs: Selection<SVGDefsElement, unknown, null, undefined>;
var coastline: Selection<SVGGElement, unknown, null, undefined>;
var lakes: Selection<SVGGElement, unknown, null, undefined>;
var getColorScheme: (scheme: string | null) => (t: number) => string;
var getColor: (height: number, scheme: (t: number) => string) => string;
var svgWidth: number;