File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010} from "d3" ;
1111import { composeRender , Mark } from "../mark.js" ;
1212import { constant , keyword , maybeInterval } from "../options.js" ;
13- import { pixelPrecision } from "../precision.js" ;
13+ import { pixelRound } from "../precision.js" ;
1414
1515export class Brush extends Mark {
1616 constructor ( { dimension = "xy" , interval, sync = false } = { } ) {
@@ -294,7 +294,6 @@ function renderFilter(initialTest) {
294294
295295function precisionInvert ( scale , projection ) {
296296 if ( projection || ! scale ?. invert ) return ( d ) => d ;
297- const interval = pixelPrecision ( scale ) ;
298- if ( interval == null ) return scale . invert . bind ( scale ) ;
299- return ( p ) => interval . floor ( scale . invert ( p ) ) ;
297+ const round = pixelRound ( scale ) ;
298+ return ( p ) => round ( scale . invert ( p ) ) ;
300299}
You can’t perform that action at this time.
0 commit comments