taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
18 lines (17 loc) • 814 B
JavaScript
import { jsxs as v, jsx as n } from "react/jsx-runtime";
import { useRef as p, useState as c } from "react";
import { o as M, aa as L, ab as X, ac as Y } from "./JBrowsePanel-BNE3gNW1.js";
const C = M(function(s) {
const { model: t } = s, i = p(null), [a, l] = 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;
l(d.clientY - m), u(d.clientX - f);
}, onMouseLeave: () => {
l(void 0), u(void 0);
}, children: [n(L, { ...s }), n(X, { model: t }), r && a ? n(Y, { mouseX: r, mouseY: a, model: t }) : null] });
});
export {
C as default
};
//# sourceMappingURL=VariantDisplayComponent-CaofoTfe.js.map