taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
32 lines (31 loc) • 833 B
JavaScript
import { u as i, O as s, Q as c, j as d } from "./JBrowsePanel-uJIA-L6s.js";
async function u(t) {
const { rpcSessionId: a } = i.getContainingTrack(t), { rpcManager: o } = i.getSession(t), n = i.getContainingView(t);
if (!n.initialized || t.error || !t.statsReadyAndRegionNotTooLarge)
return;
t.setLoading(!0);
const e = await o.call(a, "CoreGetFeatures", {
sessionId: a,
regions: n.staticBlocks.contentBlocks,
adapterConfig: t.adapterConfig
});
t.setFeatures(i.dedupe(e, (r) => r.id())), t.setLoading(!1);
}
function g(t, a, o) {
s(t, c(async () => {
try {
await a();
} catch (n) {
d(t) && t.setError(n);
}
}, o));
}
function y(t) {
g(t, async () => {
await u(t);
}, { delay: 1e3 });
}
export {
y as doAfterAttach
};
//# sourceMappingURL=afterAttach-CAAanLgq.js.map