@jbrowse/plugin-wiggle
Version:
JBrowse 2 wiggle adapters, tracks, etc.
18 lines (17 loc) • 1.27 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const util_1 = require("@jbrowse/core/util");
const mobx_react_1 = require("mobx-react");
const ColorLegend_1 = __importDefault(require("./ColorLegend"));
const util_2 = require("./util");
const YScaleBar_1 = __importDefault(require("../../shared/YScaleBar"));
const FullHeightScaleBar = (0, mobx_react_1.observer)(function ({ model, orientation, exportSVG, }) {
const { labelWidth } = model;
const { width: viewWidth } = (0, util_1.getContainingView)(model);
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${!exportSVG ? (0, util_2.getOffset)(model) : 0},0)`, children: (0, jsx_runtime_1.jsx)(YScaleBar_1.default, { model: model, orientation: orientation }) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(${viewWidth - labelWidth - 100},0)`, children: (0, jsx_runtime_1.jsx)(ColorLegend_1.default, { exportSVG: exportSVG, model: model, rowHeight: 12 }) })] }));
});
exports.default = FullHeightScaleBar;