rkgibson2 / data-driven-dota

Dota 2 visualizations, for CS 171 final project
6 stars 2 forks source link

d2 library load time #13

Closed BenjyLevin closed 10 years ago

BenjyLevin commented 10 years ago

I think we may have a concurrency issue with our d2 library. The library takes some time to load in the data from our json, however, the file calling the library functions may try to execute the functions before the data has been populated.

At the moment, I have wrapped my selector in a setTimeout(function(){},2000) to delay the call which seems to be working, but I don't think this is ideal.

Is there any way around this?

rkgibson2 commented 10 years ago

d2.loadJson(callback)