@@ -21,6 +21,7 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...op
2121 // outermost render function because it will re-render dynamically in
2222 // response to pointer events.
2323 render : composeRender ( function ( index , scales , values , dimensions , context , next ) {
24+ context = { ...context , pointerSticky : false } ;
2425 const svg = context . ownerSVGElement ;
2526 const { data} = context . getMarkState ( this ) ;
2627
@@ -100,10 +101,10 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...op
100101 function render ( ii ) {
101102 if ( i === ii && s === state . sticky ) return ; // the tooltip hasn’t moved
102103 i = ii ;
103- s = state . sticky ;
104+ s = context . pointerSticky = state . sticky ;
104105 const I = i == null ? [ ] : [ i ] ;
105106 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 ) ;
107108 if ( g ) {
108109 // When faceting, preserve swapped mark and facet transforms; also
109110 // remove ARIA attributes since these are promoted to the parent. This
0 commit comments