renaming for clarity

This commit is contained in:
Connor Turland 2017-03-16 11:17:25 -04:00
parent 43ffbbca82
commit c97b769a1a
2 changed files with 5 additions and 5 deletions

View file

@ -90,7 +90,7 @@ const Map = {
}, },
launch: function(id) { launch: function(id) {
const self = Map const self = Map
var start = function() { var dataIsReadySetupMap = function() {
Map.setAccessRequest() Map.setAccessRequest()
Visualize.type = 'ForceDirected' Visualize.type = 'ForceDirected'
JIT.prepareVizData() JIT.prepareVizData()
@ -107,7 +107,7 @@ const Map = {
ReactApp.render() ReactApp.render()
} }
function isLoaded() { function isLoaded() {
if (InfoBox.generateBoxHTML) start() if (InfoBox.generateBoxHTML) dataIsReadySetupMap()
else setTimeout(() => isLoaded(), 50) else setTimeout(() => isLoaded(), 50)
} }
if (Active.Map && Active.Map.id === id) { if (Active.Map && Active.Map.id === id) {

View file

@ -36,7 +36,7 @@ const Topic = {
} else callback(DataModel.Topics.get(id)) } else callback(DataModel.Topics.get(id))
}, },
launch: function(id) { launch: function(id) {
var start = function() { var dataIsReadySetupTopic = function() {
Visualize.type = 'RGraph' Visualize.type = 'RGraph'
JIT.prepareVizData() JIT.prepareVizData()
Selected.reset() Selected.reset()
@ -49,7 +49,7 @@ const Topic = {
ReactApp.render() ReactApp.render()
} }
if (Active.Topic && Active.Topic.id === id) { if (Active.Topic && Active.Topic.id === id) {
start() dataIsReadySetupTopic()
} }
else { else {
Loading.show() Loading.show()
@ -61,7 +61,7 @@ const Topic = {
DataModel.Topics = new DataModel.TopicCollection([data.topic].concat(data.relatives)) DataModel.Topics = new DataModel.TopicCollection([data.topic].concat(data.relatives))
DataModel.Synapses = new DataModel.SynapseCollection(data.synapses) DataModel.Synapses = new DataModel.SynapseCollection(data.synapses)
DataModel.attachCollectionEvents() DataModel.attachCollectionEvents()
start() dataIsReadySetupTopic()
} }
}) })
} }