diff --git a/music_graph/src/MusicGraph.js b/music_graph/src/MusicGraph.js index c51f52e..b6ca944 100644 --- a/music_graph/src/MusicGraph.js +++ b/music_graph/src/MusicGraph.js @@ -198,7 +198,6 @@ export function MusicGraph(data) { .then(data => { if (data.newNodes.length > 0) { this.expandedNodes.add(d.id) - this.graphSize++ this.addNodes(data.newNodes, data.relations, d.id) } }) @@ -317,6 +316,7 @@ export function MusicGraph(data) { } this.nodeDbClick = (d) => { + this.dismiss() if (this.svg.classed('menu-mode')) { return } @@ -427,6 +427,9 @@ export function MusicGraph(data) { } } + if (nodesToAdd.length > 0) { + this.graphSize++ + } if (nodesToAdd.length > 100) { // That's a lot of nodes, increase spacing this.graphSize++ @@ -496,7 +499,7 @@ export function MusicGraph(data) { .force('link', d3.forceLink(this.links) .id(d => d.id) .strength(l => l.weight) - .distance(d => (1.12 / d.weight) * 80 * (this.graphSize)) + .distance(d => (1.12 / d.weight) * 40 * (this.graphSize)) ) this.simulation.alphaTarget(0.03).restart() diff --git a/music_graph/src/components/ArtistInfo.vue b/music_graph/src/components/ArtistInfo.vue index ab80d41..0c63c1e 100644 --- a/music_graph/src/components/ArtistInfo.vue +++ b/music_graph/src/components/ArtistInfo.vue @@ -5,6 +5,9 @@ {{artist.name}}[{{artistInfo.year}}]
+ + + - @media screen and (min-width: 600px){ + @media screen and (min-width: 600px) { .artist-info { margin: 0 1em; position: fixed; background: rgba(255, 255, 255, 0.92); - font-family: "Bitstream Vera Sans",serif; + font-family: "Bitstream Vera Sans", serif; } .comment { @@ -170,7 +173,7 @@ export default { width: 100%; position: fixed; background: white; - box-shadow: rgba(0,0,0,0.9) -3px 1px 10px; + box-shadow: rgba(0, 0, 0, 0.9) -3px 1px 10px; top: calc(100% - 200px); } diff --git a/music_graph/static/MB.png b/music_graph/static/MB.png new file mode 100644 index 0000000..c6dd133 Binary files /dev/null and b/music_graph/static/MB.png differ