fix: Fixed annoying display bug
This commit is contained in:
parent
fcc28c19aa
commit
a15965c9ba
|
@ -83,13 +83,15 @@ function findDistancesForAllElements({nodes, links}){
|
|||
|
||||
function abridgeArrayAndDisplay(array){
|
||||
let newArray
|
||||
let formatForDisplay
|
||||
if(array.length > 10){
|
||||
newArray = array.slice(0,10)
|
||||
newArray[11] = "..."
|
||||
newArray = array.slice(0,9)
|
||||
formatForDisplay= newArray.map(d => formatLargeOrSmall(d))
|
||||
formatForDisplay[9] = "..."
|
||||
}else{
|
||||
newArray=array
|
||||
formatForDisplay= newArray.map(d => formatLargeOrSmall(d))
|
||||
}
|
||||
let formatForDisplay= newArray.map(d => formatLargeOrSmall(d))
|
||||
let result = JSON.stringify(formatForDisplay, null, 2).replaceAll(`"`, "")
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user