Skip to content

Commit bfea2c6

Browse files
committed
no pointer-specific state
1 parent 42f7477 commit bfea2c6

File tree

4 files changed

+408
-1
lines changed

4 files changed

+408
-1
lines changed

src/interactions/pointer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {pointer as pointof} from "d3";
22
import {applyFrameAnchor} from "../style.js";
33

4+
const states = new WeakMap();
5+
46
function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, ...options} = {}) {
57
maxRadius = +maxRadius;
68
// When px or py is used, register an extra channel that the pointer
@@ -9,7 +11,6 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, ...options} =
911
// displayed. Also default x or y to null to disable maybeTuple etc.
1012
if (px != null) (x ??= null), (channels = {...channels, px: {value: px, scale: "x"}});
1113
if (py != null) (y ??= null), (channels = {...channels, py: {value: py, scale: "y"}});
12-
const states = new WeakMap();
1314
return {
1415
x,
1516
y,

src/mark.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@ export interface MarkOptions {
453453

454454
/** The abstract base class for Mark implementations. */
455455
export class Mark {
456+
/** The mark’s data. */
457+
data?: Data;
458+
456459
/**
457460
* Renders a new plot, prepending this mark as the first element of **marks**
458461
* of the specified *options*, and returns the corresponding SVG element, or

0 commit comments

Comments
 (0)