@@ -16,8 +16,7 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, ...options} =
16
16
y,
17
17
channels,
18
18
...options ,
19
- render ( index , scales , values , dimensions , context ) {
20
- const mark = this ;
19
+ render ( index , scales , values , dimensions , context , next ) {
21
20
const svg = context . ownerSVGElement ;
22
21
23
22
// Isolate state per-pointer, per-plot; if the pointer is reused by
@@ -50,8 +49,8 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, ...options} =
50
49
if ( faceted ) {
51
50
let facetStates = state . facetStates ;
52
51
if ( ! facetStates ) state . facetStates = facetStates = new Map ( ) ;
53
- facetState = facetStates . get ( mark ) ;
54
- if ( ! facetState ) facetStates . set ( mark , ( facetState = new Map ( ) ) ) ;
52
+ facetState = facetStates . get ( this ) ;
53
+ if ( ! facetState ) facetStates . set ( this , ( facetState = new Map ( ) ) ) ;
55
54
}
56
55
57
56
// The order of precedence for the pointer position is: px & py; the
@@ -97,7 +96,7 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, ...options} =
97
96
i = ii ;
98
97
const I = i == null ? [ ] : [ i ] ;
99
98
if ( faceted ) ( I . fx = index . fx ) , ( I . fy = index . fy ) , ( I . fi = index . fi ) ;
100
- const r = mark . render ( I , scales , values , dimensions , context ) ;
99
+ const r = next ( I , scales , values , dimensions , context ) ;
101
100
if ( g ) {
102
101
// When faceting, preserve swapped mark and facet transforms; also
103
102
// remove ARIA attributes since these are promoted to the parent. This
0 commit comments