hide circles when transitioning from topic view to map view

fixes #389
This commit is contained in:
Devin Howard 2016-09-25 20:10:18 +08:00
parent 43fafb8e6f
commit 7734272737
2 changed files with 9 additions and 8 deletions

View file

@ -6,7 +6,6 @@ import Backbone from 'backbone'
import Active from './Active'
import GlobalUI from './GlobalUI'
import JIT from './JIT'
import Map from './Map'
import Topic from './Topic'
import Views from './Views'
@ -170,9 +169,7 @@ const _Router = Backbone.Router.extend({
// clear the visualization, if there was one, before showing its div again
if (Visualize.mGraph) {
Visualize.mGraph.graph.empty()
Visualize.mGraph.plot()
JIT.centerMap(Visualize.mGraph.canvas)
Visualize.clearVisualization()
}
GlobalUI.showDiv('#infovis')
Topic.end()
@ -198,9 +195,7 @@ const _Router = Backbone.Router.extend({
// clear the visualization, if there was one, before showing its div again
if (Visualize.mGraph) {
Visualize.mGraph.graph.empty()
Visualize.mGraph.plot()
JIT.centerMap(Visualize.mGraph.canvas)
Visualize.clearVisualization()
}
GlobalUI.showDiv('#infovis')
Map.end()

View file

@ -220,7 +220,13 @@ const Visualize = {
Router.navigate('/topics/' + t.id)
}
}, 800)
}
},
clearVisualization: function() {
Visualize.mGraph.graph.empty()
Visualize.mGraph.plot()
JIT.centerMap(Visualize.mGraph.canvas)
$('#infovis').empty()
},
}
export default Visualize