-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathcontext.d.ts
More file actions
27 lines (21 loc) · 859 Bytes
/
context.d.ts
File metadata and controls
27 lines (21 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import type {GeoPath} from "d3";
import type {MarkOptions} from "./mark.js";
import type {Projection} from "./projection.js";
/** Additional rendering context provided to marks and initializers. */
export interface Context {
/**
* The current document. Defaults to window.document, but may be overridden
* via plot options as when rendering plots in a headless environment.
*/
document: Document;
/** The current owner SVG element. */
ownerSVGElement: SVGSVGElement;
/** The Plot’s (typically generated) class name, for custom styles. */
className: string;
/** The current projection, if any. */
projection?: Projection;
/** A function to draw GeoJSON with the current projection, if any; otherwise, with the x and y scales. */
path: () => GeoPath;
/** The default clip for all marks. */
clip?: MarkOptions["clip"];
}