taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
58 lines (57 loc) • 1.99 kB
JavaScript
import { jsxs as m, jsx as o } from "react/jsx-runtime";
import { B as c } from "./BaseCard-uve71KMy.js";
import { u as i, T as u } from "./JBrowsePanel-BNE3gNW1.js";
import { lazy as d } from "react";
import { L as p } from "./Link-M04Fp4z_.js";
const g = d(() => import("./BreakendMultiLevelOptionDialog-DS6LCErm.js")), f = d(() => import("./BreakendSingleLevelOptionDialog-D-yj6OdO.js"));
function h({ model: t, feature: e }) {
const n = i.getSession(t), a = {
uniqueId: e.uniqueId,
refName: e.refName,
start: e.start,
end: e.end,
strand: e.strand
}, s = {
uniqueId: `${e.id}-mate`,
refName: e.next_ref,
start: e.next_pos,
end: e.next_pos + 1,
strand: e.strand
};
return m("div", { children: [o(u, { children: "Launch split view" }), o("ul", { children: m("li", { children: [a.refName, ":", i.toLocale(a.start), " -> ", s.refName, ":", i.toLocale(s.start), " ", o(p, { href: "#", onClick: (r) => {
r.preventDefault(), n.queueDialog((l) => [
g,
{
handleClose: l,
session: n,
feature: new i.SimpleFeature({ ...a, mate: s }),
view: t.view,
assemblyName: t.view.displayedRegions[0].assemblyName
}
]);
}, children: "(top/bottom)" }), " ", o(p, { href: "#", onClick: (r) => {
r.preventDefault(), n.queueDialog((l) => [
f,
{
handleClose: l,
session: n,
feature: new i.SimpleFeature({ ...a, mate: s }),
view: t.view,
assemblyName: t.view.displayedRegions[0].assemblyName
}
]);
}, children: "(single row)" })] }) })] });
}
function k(t) {
const { model: e, feature: n } = t, a = i.getSession(e), { pluginManager: s } = i.getEnv(a);
let r = !1;
try {
r = !!s.getViewType("BreakpointSplitView");
} catch {
}
return r ? o(c, { ...t, title: "Paired alignments", children: o(h, { model: e, feature: n }) }) : null;
}
export {
k as default
};
//# sourceMappingURL=LinkedPairedAlignments--RaGJiEw.js.map