@jbrowse/plugin-wiggle
Version:
JBrowse 2 wiggle adapters, tracks, etc.
13 lines (12 loc) • 878 B
JavaScript
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { getContainingView } from '@jbrowse/core/util';
import { observer } from 'mobx-react';
import ColorLegend from './ColorLegend';
import { getOffset } from './util';
import YScaleBar from '../../shared/YScaleBar';
const FullHeightScaleBar = observer(function ({ model, orientation, exportSVG, }) {
const { labelWidth } = model;
const { width: viewWidth } = getContainingView(model);
return (_jsxs(_Fragment, { children: [_jsx("g", { transform: `translate(${!exportSVG ? getOffset(model) : 0},0)`, children: _jsx(YScaleBar, { model: model, orientation: orientation }) }), _jsx("g", { transform: `translate(${viewWidth - labelWidth - 100},0)`, children: _jsx(ColorLegend, { exportSVG: exportSVG, model: model, rowHeight: 12 }) })] }));
});
export default FullHeightScaleBar;