diff --git a/src/components/NodeMap.vue b/src/components/NodeMap.vue index 7426533..9443b48 100644 --- a/src/components/NodeMap.vue +++ b/src/components/NodeMap.vue @@ -3,24 +3,30 @@ width="100%" height="100%" ref="svg" :id="id" > - + @@ -45,11 +51,13 @@ export default { props: { nodes: { type: Array, required: true }, links: { type: Array, required: true }, - id: { type: String, default: 'map' } + id: { type: String, default: 'node-map' }, + showId: { type: Boolean, default: true } }, data () { return { + ready: false, width: 100, height: 100, simulation: forceSimulation(), @@ -74,6 +82,7 @@ export default { this.setupForces() // Wait for DOM update so d3 can select this.$nextTick(this.initListeners) + this.ready = true }, initListeners () { diff --git a/src/pages/Map.vue b/src/pages/Map.vue index 4b60241..2a4310e 100644 --- a/src/pages/Map.vue +++ b/src/pages/Map.vue @@ -1,16 +1,50 @@