diff --git a/frontend/src/Metamaps/Create.js b/frontend/src/Metamaps/Create.js index e18ed1b3..bfb9b94c 100644 --- a/frontend/src/Metamaps/Create.js +++ b/frontend/src/Metamaps/Create.js @@ -346,7 +346,7 @@ const Create = { Create.newSynapse.topic1id = 0 Create.newSynapse.topic2id = 0 Mouse.synapseStartCoordinates = [] - Visualize.mGraph.plot() + if (Visualize.mGraph) Visualize.mGraph.plot() }, } } diff --git a/frontend/src/Metamaps/Router.js b/frontend/src/Metamaps/Router.js index 8bcd3590..9ad80187 100644 --- a/frontend/src/Metamaps/Router.js +++ b/frontend/src/Metamaps/Router.js @@ -27,7 +27,8 @@ const _Router = Backbone.Router.extend({ '': 'home', // #home 'explore/:section': 'explore', // #explore/active 'explore/:section/:id': 'explore', // #explore/mapper/1234 - 'maps/:id': 'maps' // #maps/7 + 'maps/:id': 'maps', // #maps/7 + 'topics/:id': 'topics' // #topics/7 }, home: function () { let self = this @@ -182,8 +183,6 @@ const _Router = Backbone.Router.extend({ topics: function (id) { clearTimeout(this.timeoutId) - document.title = 'Topic ' + id + ' | Metamaps' - this.currentSection = 'topic' this.currentPage = id diff --git a/frontend/src/Metamaps/Topic.js b/frontend/src/Metamaps/Topic.js index c2f3ff29..34e2bb64 100644 --- a/frontend/src/Metamaps/Topic.js +++ b/frontend/src/Metamaps/Topic.js @@ -69,6 +69,8 @@ const Topic = { Metamaps.Synapses = new bb.SynapseCollection(data.synapses) Metamaps.Backbone.attachCollectionEvents() + document.title = Active.Topic.get('name') + ' | Metamaps' + // set filter mapper H3 text $('#filter_by_mapper h3').html('CREATORS')