@jbrowse/plugin-wiggle
Version:
JBrowse 2 wiggle adapters, tracks, etc.
16 lines (15 loc) • 999 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderSvg = renderSvg;
const jsx_runtime_1 = require("react/jsx-runtime");
const util_1 = require("@jbrowse/core/util");
const mobx_1 = require("mobx");
const YScaleBars_1 = __importDefault(require("./components/YScaleBars"));
async function renderSvg(self, opts, superRenderSvg) {
await (0, mobx_1.when)(() => !!self.stats && !!self.regionCannotBeRenderedText);
const { offsetPx } = (0, util_1.getContainingView)(self);
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("g", { children: await superRenderSvg(opts) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: (0, jsx_runtime_1.jsx)(YScaleBars_1.default, { model: self, orientation: "left", exportSVG: true }) })] }));
}