UNPKG

taxonium-component

Version:

React component for exploring large phylogenetic trees in the browser

35 lines (34 loc) 1.63 kB
import { jsx as n, jsxs as l } from "react/jsx-runtime"; import { o as a, a5 as c, a6 as d, B as g, u as p, m as u, a as f } from "./JBrowsePanel-uJIA-L6s.js"; import "react"; const x = u()((t) => ({ loading: { backgroundColor: t.palette.background.default, backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 5px, ${t.palette.action.disabledBackground} 5px, ${t.palette.action.disabledBackground} 10px)`, position: "absolute", bottom: 0, height: 50, width: 300, right: 0, pointerEvents: "none", textAlign: "center" } })), b = a(function({ model: t }) { const { error: e } = t; return n(c, { message: `${e}`, severity: "error", action: n(d, { title: "Reload", children: n(g, { "data-testid": "reload_button", onClick: () => { t.reload(); }, children: "Reload" }) }) }); }), w = a(function({ model: t, children: e }) { const { error: o, regionTooLarge: r } = t; return o ? n(b, { model: t }) : r ? t.regionCannotBeRendered() : n(B, { model: t, children: e }); }), B = a(function({ model: t, children: e }) { const { drawn: o, loading: r } = t, i = p.getContainingView(t), s = (t.lastDrawnOffsetPx || 0) - i.offsetPx; return l("div", { "data-testid": `drawn-${o}`, children: [n("div", { style: { position: "absolute", left: s }, children: e }), s !== 0 || r ? n(k, { model: t }) : null] }); }), k = a(function({ model: t }) { const { classes: e } = x(), { message: o } = t; return n("div", { className: e.loading, children: n(f.LoadingEllipses, { message: o }) }); }); export { w as B }; //# sourceMappingURL=BaseDisplayComponent-CFUtw3zA.js.map