Skip to content
Snippets Groups Projects
Commit e298fdb6 authored by Xiao Gui's avatar Xiao Gui Committed by xgui3783
Browse files

bugfix: filter sometimes render buggy hierarchy guiding dashed lnies

parent 6d34b62c
No related branches found
No related tags found
No related merge requests found
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name : 'clusteringPipe'
})
export class ClusteringPipe implements PipeTransform{
public transform(arr:any[],num:number = 100):any[][]{
return arr.reduce((acc,curr,idx,arr) => idx % num === 0
? acc.concat([arr.slice(idx, idx + num)])
: acc ,[])
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment