@@ -306,19 +306,25 @@ export function clear(idx: number, parent?: string, targetBrush?: boolean) {
306306 return `pureClear(${ idx } , ${ stringValue ( parent ) } , ${ ! ! targetBrush } )` ;
307307}
308308
309- export function clearRegion ( idx : number , parent ?: string , targetBrush ?: boolean ) {
309+ export function clearRegion ( idx : number | {
310+ id : number ;
311+ count ?: number ;
312+ } , parent ?: string , targetBrush ?: boolean ) {
310313 return `clear(${ idx } , ${ stringValue ( parent ) } , ${ ! ! targetBrush } )` ;
311314}
312315
313- export function circleRegion ( idx : number , parent ?: string , targetBrush ?: boolean , radius = 40 , segments = 20 ) {
316+ export function circleRegion ( idx : number | {
317+ id : number ;
318+ count ?: number ;
319+ } , parent ?: string , targetBrush ?: boolean , radius = 40 , segments = 20 ) {
314320 return `circleRegion(${ idx } , ${ radius } , ${ segments } , ${ stringValue ( parent ) } , ${ ! ! targetBrush } )` ;
315321}
316322
317323export function polygonRegion ( idx : number , polygon : number [ ] [ ] , parent ?: string , targetBrush ?: boolean ) {
318324 return `polygonRegion(${ idx } , ${ JSON . stringify ( polygon ) } , ${ stringValue ( parent ) } , ${ ! ! targetBrush } )` ;
319325}
320326
321- export function multiviewRegion ( key : string , idx : number , parent ?: string , targetBrush ?: boolean ) {
327+ export function multiviewRegion ( key : keyof typeof hits . region , idx : number , parent ?: string , targetBrush ?: boolean ) {
322328 return key . match ( '_clear' )
323329 ? clearRegion ( hits . region [ key ] [ idx ] , parent , targetBrush )
324330 : circleRegion ( hits . region [ key ] [ idx ] , parent , targetBrush , 10 ) ;
@@ -329,7 +335,7 @@ export function brush(key: BrushKeys, idx: number, parent?: string, targetBrush?
329335 return `${ fn } (${ hits . interval [ key ] [ idx ] . join ( ', ' ) } , ${ stringValue ( parent ) } , ${ ! ! targetBrush } )` ;
330336}
331337
332- export function pt ( key : string , idx : number , parent ?: string ) {
338+ export function pt ( key : keyof typeof hits . point , idx : number , parent ?: string ) {
333339 const fn = key . match ( '_clear' ) ? 'clear' : 'pt' ;
334340 return `${ fn } (${ hits . point [ key ] [ idx ] } , ${ stringValue ( parent ) } )` ;
335341}
0 commit comments