parent
43fafb8e6f
commit
7734272737
2 changed files with 9 additions and 8 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue