diff --git a/src/components/article/ClusterLabels.svelte b/src/components/article/ClusterLabels.svelte index 97b16d3..abd7c73 100644 --- a/src/components/article/ClusterLabels.svelte +++ b/src/components/article/ClusterLabels.svelte @@ -5,7 +5,6 @@ export let animatedIn; let data; - let dataType = null; $: { data = groups(nodes, d => d.data.info.position) } @@ -44,7 +43,6 @@ {@const center = centroid(position[1])} {@const textWidth = getTextWidth(position[0])} - {console.log(data[0][1][0].data.info.type)} {#if data[0][1][0].data.info.type === "instagram"} {#if i == 1} {position[0]} @@ -56,6 +54,17 @@ {position[0]} {position[0]} {/if} + {:else if data[0][1][0].data.info.type === "review" || data[0][1][0].data.info.type === "study"} + {#if i == 1} + {position[0]} + {position[0]} + {:else if i == 0} + {position[0]} + {position[0]} + {:else} + {position[0]} + {position[0]} + {/if} {:else} {position[0]} {position[0]} diff --git a/src/components/article/ForceBubbles.svelte b/src/components/article/ForceBubbles.svelte index 3f90a09..016fa34 100644 --- a/src/components/article/ForceBubbles.svelte +++ b/src/components/article/ForceBubbles.svelte @@ -72,6 +72,7 @@ function runSimulation(){ + console.log(renderedData[0].type); $hoveredCircle = null; if(nodes?.length !== renderedData?.length){ @@ -241,7 +242,12 @@ {#if renderedData.length !== 2} {#key renderedData[0].type}

- {legendText[renderedData[0].type]} + {#if renderedData[0].type === undefined} + + Test title + {:else} + {legendText[renderedData[0].type]} + {/if}

{/key} {/if}