UNPKG

@jbrowse/plugin-wiggle

Version:

JBrowse 2 wiggle adapters, tracks, etc.

11 lines (10 loc) 704 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 YScaleBar from '../shared/YScaleBar'; export async function renderSvg(self, opts, superRenderSvg) { await when(() => !!self.stats && !!self.regionCannotBeRenderedText); const { graphType, stats } = self; const { offsetPx } = getContainingView(self); return (_jsxs(_Fragment, { children: [_jsx("g", { children: await superRenderSvg(opts) }), graphType && stats ? (_jsx("g", { transform: `translate(${Math.max(-offsetPx, 0)})`, children: _jsx(YScaleBar, { model: self, orientation: "left" }) })) : null] })); }