add loading state to LibraryList

This commit is contained in:
axolotle
2021-06-29 16:53:41 +02:00
parent 5a9e28f85e
commit c536c37ec2
2 changed files with 21 additions and 19 deletions
+2 -2
View File
@@ -96,10 +96,10 @@ export default {
const radius = window.innerWidth < 769 ? 700 / 1.5 : 700
this.$store.dispatch('INIT_LIBRARY_MAP').then(nodes => {
this.nodes = nodes.map((node, i) => {
return { x: i, rotate: randomUniform(-25, 25)(), data: node }
return { x: 0, rotate: randomUniform(-25, 25)(), data: node }
})
this.simulation.nodes(this.nodes)
.force('attract', forceManyBody().strength(10))
.force('attract', forceManyBody())
.force('collision', forceCollide().radius(radius / 2))
})
}