Merge pull request #709 from metamaps/bug/backbone

backbone router fix
This commit is contained in:
Devin Howard 2016-10-03 08:28:36 +08:00 committed by GitHub
commit 6d2efefbbc
3 changed files with 5 additions and 4 deletions

View file

@ -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()
},
}
}

View file

@ -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

View file

@ -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')