fix: Fixed annoying display bug

This commit is contained in:
NunoSempere 2021-11-26 14:31:30 +00:00
parent fcc28c19aa
commit a15965c9ba

View File

@ -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
}