UNPKG

@jbrowse/plugin-wiggle

Version:

JBrowse 2 wiggle adapters, tracks, etc.

10 lines (9 loc) 658 B
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; import { getContainingView } from '@jbrowse/core/util'; import { when } from 'mobx'; import YScaleBars from './components/YScaleBars'; export async function renderSvg(self, opts, superRenderSvg) { await when(() => !!self.stats && !!self.regionCannotBeRenderedText); const { offsetPx } = getContainingView(self); return (_jsxs(_Fragment, { children: [_jsx("g", { children: await superRenderSvg(opts) }), _jsx("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: _jsx(YScaleBars, { model: self, orientation: "left", exportSVG: true }) })] })); }