MCPcopy Create free account
hub / github.com/plotly/plotly.js / wait

Function wait

src/lib/geo_location_utils.js:359–374  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

357 }
358
359 function wait(url) {
360 return new Promise(function (resolve, reject) {
361 var cnt = 0;
362 var interval = setInterval(function () {
363 if (PlotlyGeoAssets[url] && PlotlyGeoAssets[url] !== 'pending') {
364 clearInterval(interval);
365 return resolve(PlotlyGeoAssets[url]);
366 }
367 if (cnt > 100) {
368 clearInterval(interval);
369 return reject('Unexpected error while fetching from ' + url);
370 }
371 cnt++;
372 }, 50);
373 });
374 }
375
376 for (var i = 0; i < calcData.length; i++) {
377 var trace = calcData[i][0].trace;

Callers 1

fetchTraceGeoDataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…