Skip to content

Commit

Permalink
Add just new items to clusters and singles
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Sep 6, 2023
1 parent fad6a33 commit a415d8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stores/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export const useCluster = defineStore('cluster', () => {

if (item) {
item.memoizedArea = addBBoxToArea(boundingBox.value!, item.memoizedArea)
item.memoizedClusters.forEach(cluster => newClusters.push(cluster))
item.memoizedSingles.forEach(single => newSingles.push(single))
item.memoizedClusters.push(...newClusters.filter(c => item.memoizedClusters.every(i => i.id !== c.id)))
item.memoizedSingles.push(...newSingles.filter(s => item.memoizedSingles.every(i => i.uuid !== s.uuid)))
memoized.set(key, item)
}
else {
Expand Down

0 comments on commit a415d8e

Please sign in to comment.