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){
|
function abridgeArrayAndDisplay(array){
|
||||||
let newArray
|
let newArray
|
||||||
|
let formatForDisplay
|
||||||
if(array.length > 10){
|
if(array.length > 10){
|
||||||
newArray = array.slice(0,10)
|
newArray = array.slice(0,9)
|
||||||
newArray[11] = "..."
|
formatForDisplay= newArray.map(d => formatLargeOrSmall(d))
|
||||||
|
formatForDisplay[9] = "..."
|
||||||
}else{
|
}else{
|
||||||
newArray=array
|
newArray=array
|
||||||
|
formatForDisplay= newArray.map(d => formatLargeOrSmall(d))
|
||||||
}
|
}
|
||||||
let formatForDisplay= newArray.map(d => formatLargeOrSmall(d))
|
|
||||||
let result = JSON.stringify(formatForDisplay, null, 2).replaceAll(`"`, "")
|
let result = JSON.stringify(formatForDisplay, null, 2).replaceAll(`"`, "")
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user