This commit is contained in:
Connor Turland 2017-01-12 14:11:01 -05:00
parent 149b7ecbd6
commit e7a52dc14e
3 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ const Cable = {
},
unsubscribeFromMap: () => {
let self = Cable
self.sub.unsubscribe()
self.sub && self.sub.unsubscribe()
delete self.sub
},
synapseAdded: event => {

View file

@ -36,7 +36,7 @@ const Engine = {
Engine.runner = Matter.Runner.run(Engine.engine)
},
endActiveMap: () => {
Runner.stop(Engine.runner)
Engine.runner && Runner.stop(Engine.runner)
Matter.Engine.clear(Engine.engine)
},
setNodePos: (id, x, y) => {

View file

@ -159,6 +159,8 @@ const Visualize = {
function runAnimation() {
Loading.hide()
$('#new_topic').show()
$('#topic_name').focus()
// load JSON data, if it's not empty
if (!self.loadLater) {
// load JSON data.
@ -178,8 +180,6 @@ const Visualize = {
} else if (self.type === 'ForceDirected') {
self.mGraph.plot()
Engine.run(true)
$('#new_topic').show()
$('#topic_name').focus()
} else if (self.type === 'ForceDirected3D') {
self.mGraph.animate(JIT.ForceDirected.animateFDLayout)
}