-
Notifications
You must be signed in to change notification settings - Fork 240
Open
Labels
Description
Getting a bunch of unreferenced slatlong errors (specifically on chrome), seemingly at random. looks sort of like an async issue?
adding d3-queue.v3.min.js and tossing all the good bits into a deferred queue seems to fix this
d3.queue()
.defer(d3.csv, "assets/csv/samplatlong.csv")
.defer(d3.tsv, "assets/csv/country_centroids_primary.csv")
.await(analyze);
function analyze(error, slatlong, centers) {
if(error) { console.log(error); }
else {
console.log("COORDINATES RECEIVED");
var attacks = {
interval: getRandomInt(attack_min, attack_max),
init: function(){
setTimeout(
jQuery.proxy(this.getData, this),
this.interval
);
},
getData: function() {
. . . . etcetc
attacks.init();
}