UNPKG

taxonium-component

Version:

React component for exploring large phylogenetic trees in the browser

18 lines (17 loc) 814 B
import { jsxs as v, jsx as n } from "react/jsx-runtime"; import { useRef as p, useState as c } from "react"; import { o as M, aj as L, ak as X, al as Y } from "./JBrowsePanel-uJIA-L6s.js"; const B = M(function(s) { const { model: t } = s, i = p(null), [l, a] = c(), [r, u] = c(); return v("div", { ref: i, onMouseMove: (d) => { var o; const e = (o = i.current) === null || o === void 0 ? void 0 : o.getBoundingClientRect(), m = (e == null ? void 0 : e.top) || 0, f = (e == null ? void 0 : e.left) || 0; a(d.clientY - m), u(d.clientX - f); }, onMouseLeave: () => { a(void 0), u(void 0); }, children: [n(L, { ...s }), n(X, { model: t }), r && l ? n(Y, { mouseX: r, mouseY: l, model: t }) : null] }); }); export { B as default }; //# sourceMappingURL=VariantDisplayComponent-DN9MS9D6.js.map