@@ -21,6 +21,7 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...op
21
21
// outermost render function because it will re-render dynamically in
22
22
// response to pointer events.
23
23
render : composeRender ( function ( index , scales , values , dimensions , context , next ) {
24
+ context = { ...context , pointerSticky : false } ;
24
25
const svg = context . ownerSVGElement ;
25
26
const { data} = context . getMarkState ( this ) ;
26
27
@@ -100,10 +101,10 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...op
100
101
function render ( ii ) {
101
102
if ( i === ii && s === state . sticky ) return ; // the tooltip hasn’t moved
102
103
i = ii ;
103
- s = state . sticky ;
104
+ s = context . pointerSticky = state . sticky ;
104
105
const I = i == null ? [ ] : [ i ] ;
105
106
if ( faceted ) ( I . fx = index . fx ) , ( I . fy = index . fy ) , ( I . fi = index . fi ) ;
106
- const r = next ( I , scales , values , dimensions , { ... context , pointerSticky : s } ) ;
107
+ const r = next ( I , scales , values , dimensions , context ) ;
107
108
if ( g ) {
108
109
// When faceting, preserve swapped mark and facet transforms; also
109
110
// remove ARIA attributes since these are promoted to the parent. This
0 commit comments