@jbrowse/plugin-linear-comparative-view 3.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +3 -3
- package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +9 -9
- package/esm/LGVSyntenyDisplay/configSchemaF.js +1 -1
- package/esm/LGVSyntenyDisplay/index.js +2 -2
- package/esm/LGVSyntenyDisplay/model.d.ts +1179 -133
- package/esm/LGVSyntenyDisplay/model.js +2 -2
- package/esm/LaunchLinearSyntenyView.js +13 -86
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
- package/esm/LinearComparativeDisplay/index.js +2 -2
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +95 -135
- package/esm/LinearComparativeDisplay/stateModelFactory.js +18 -17
- package/esm/LinearComparativeView/components/ColorBySelector.d.ts +1 -1
- package/esm/LinearComparativeView/components/ColorBySelector.js +3 -4
- package/esm/LinearComparativeView/components/Header.d.ts +1 -1
- package/esm/LinearComparativeView/components/Header.js +8 -9
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +2 -2
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +9 -8
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeView.js +5 -5
- package/esm/LinearComparativeView/components/MinLengthSlider.d.ts +1 -1
- package/esm/LinearComparativeView/components/MinLengthSlider.js +7 -7
- package/esm/LinearComparativeView/components/OpacitySlider.d.ts +1 -1
- package/esm/LinearComparativeView/components/OpacitySlider.js +5 -6
- package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearComparativeView/components/Rubberband.js +5 -5
- package/esm/LinearComparativeView/components/RubberbandSpan.js +3 -5
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearComparativeView/components/VerticalGuide.js +2 -2
- package/esm/LinearComparativeView/components/useRangeSelect.d.ts +1 -1
- package/esm/LinearComparativeView/components/useRangeSelect.js +1 -1
- package/esm/LinearComparativeView/components/util.js +1 -1
- package/esm/LinearComparativeView/index.js +2 -2
- package/esm/LinearComparativeView/model.d.ts +474 -222
- package/esm/LinearComparativeView/model.js +50 -29
- package/esm/LinearReadVsRef/LinearReadVsRef.js +8 -9
- package/esm/LinearReadVsRef/index.js +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.js +10 -11
- package/esm/LinearSyntenyDisplay/components/BlockError.js +1 -1
- package/esm/LinearSyntenyDisplay/components/BlockMessage.js +6 -15
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/Component.js +5 -5
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +10 -14
- package/esm/LinearSyntenyDisplay/components/LoadingMessage.js +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +8 -33
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
- package/esm/LinearSyntenyDisplay/components/util.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/components/util.js +3 -3
- package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/configSchemaF.js +1 -1
- package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.d.ts +2 -0
- package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.js +53 -0
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/drawSynteny.js +3 -5
- package/esm/LinearSyntenyDisplay/index.js +3 -3
- package/esm/LinearSyntenyDisplay/model.d.ts +97 -137
- package/esm/LinearSyntenyDisplay/model.js +3 -3
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +1 -1
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.js +2 -2
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +6 -2
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +4 -4
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +4 -5
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +11 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +8 -4
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.js +26 -9
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +5 -5
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +1 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +3 -3
- package/esm/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +4 -4
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.js +4 -4
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +14 -4
- package/esm/LinearSyntenyView/index.js +2 -2
- package/esm/LinearSyntenyView/model.d.ts +522 -254
- package/esm/LinearSyntenyView/model.js +99 -15
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +3 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +2 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +34 -31
- package/esm/LinearSyntenyView/types.d.ts +10 -1
- package/esm/LinearSyntenyViewHelper/index.js +1 -1
- package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +11 -11
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +5 -43
- package/esm/SyntenyFeatureDetail/Formatter.js +2 -2
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +6 -7
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +3 -3
- package/esm/SyntenyFeatureDetail/index.js +2 -2
- package/esm/SyntenyTrack/configSchema.d.ts +16 -11
- package/esm/SyntenyTrack/index.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +11 -14
- package/esm/util.d.ts +1 -1
- package/esm/util.js +4 -8
- package/package.json +29 -35
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +0 -9
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -53
- package/dist/LGVSyntenyDisplay/components/util.d.ts +0 -14
- package/dist/LGVSyntenyDisplay/components/util.js +0 -100
- package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +0 -66
- package/dist/LGVSyntenyDisplay/configSchemaF.js +0 -38
- package/dist/LGVSyntenyDisplay/index.d.ts +0 -2
- package/dist/LGVSyntenyDisplay/index.js +0 -24
- package/dist/LGVSyntenyDisplay/model.d.ts +0 -418
- package/dist/LGVSyntenyDisplay/model.js +0 -118
- package/dist/LaunchLinearSyntenyView.d.ts +0 -2
- package/dist/LaunchLinearSyntenyView.js +0 -93
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -2
- package/dist/LinearComparativeDisplay/configSchemaF.js +0 -10
- package/dist/LinearComparativeDisplay/index.d.ts +0 -2
- package/dist/LinearComparativeDisplay/index.js +0 -24
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +0 -243
- package/dist/LinearComparativeDisplay/stateModelFactory.js +0 -146
- package/dist/LinearComparativeView/components/ColorBySelector.d.ts +0 -5
- package/dist/LinearComparativeView/components/ColorBySelector.js +0 -54
- package/dist/LinearComparativeView/components/Header.d.ts +0 -5
- package/dist/LinearComparativeView/components/Header.js +0 -87
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +0 -5
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +0 -24
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +0 -5
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +0 -46
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +0 -5
- package/dist/LinearComparativeView/components/LinearComparativeView.js +0 -30
- package/dist/LinearComparativeView/components/MinLengthSlider.d.ts +0 -5
- package/dist/LinearComparativeView/components/MinLengthSlider.js +0 -47
- package/dist/LinearComparativeView/components/OpacitySlider.d.ts +0 -5
- package/dist/LinearComparativeView/components/OpacitySlider.js +0 -46
- package/dist/LinearComparativeView/components/Rubberband.d.ts +0 -7
- package/dist/LinearComparativeView/components/Rubberband.js +0 -32
- package/dist/LinearComparativeView/components/RubberbandSpan.d.ts +0 -15
- package/dist/LinearComparativeView/components/RubberbandSpan.js +0 -38
- package/dist/LinearComparativeView/components/RubberbandTooltip.d.ts +0 -5
- package/dist/LinearComparativeView/components/RubberbandTooltip.js +0 -20
- package/dist/LinearComparativeView/components/SliderTooltip.d.ts +0 -2
- package/dist/LinearComparativeView/components/SliderTooltip.js +0 -9
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +0 -7
- package/dist/LinearComparativeView/components/VerticalGuide.js +0 -26
- package/dist/LinearComparativeView/components/useRangeSelect.d.ts +0 -59
- package/dist/LinearComparativeView/components/useRangeSelect.js +0 -124
- package/dist/LinearComparativeView/components/util.d.ts +0 -4
- package/dist/LinearComparativeView/components/util.js +0 -6
- package/dist/LinearComparativeView/index.d.ts +0 -2
- package/dist/LinearComparativeView/index.js +0 -55
- package/dist/LinearComparativeView/model.d.ts +0 -606
- package/dist/LinearComparativeView/model.js +0 -238
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +0 -6
- package/dist/LinearReadVsRef/LinearReadVsRef.js +0 -241
- package/dist/LinearReadVsRef/index.d.ts +0 -2
- package/dist/LinearReadVsRef/index.js +0 -86
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +0 -2
- package/dist/LinearSyntenyDisplay/afterAttach.js +0 -104
- package/dist/LinearSyntenyDisplay/components/BlockError.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/BlockError.js +0 -16
- package/dist/LinearSyntenyDisplay/components/BlockMessage.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/BlockMessage.js +0 -24
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +0 -5
- package/dist/LinearSyntenyDisplay/components/Component.js +0 -26
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +0 -5
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +0 -223
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.js +0 -21
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +0 -15
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +0 -56
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +0 -4
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +0 -13
- package/dist/LinearSyntenyDisplay/components/util.d.ts +0 -45
- package/dist/LinearSyntenyDisplay/components/util.js +0 -199
- package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +0 -12
- package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -23
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +0 -6
- package/dist/LinearSyntenyDisplay/drawSynteny.js +0 -470
- package/dist/LinearSyntenyDisplay/index.d.ts +0 -2
- package/dist/LinearSyntenyDisplay/index.js +0 -56
- package/dist/LinearSyntenyDisplay/model.d.ts +0 -291
- package/dist/LinearSyntenyDisplay/model.js +0 -133
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +0 -6
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.js +0 -87
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +0 -58
- package/dist/LinearSyntenyView/components/Icons.d.ts +0 -3
- package/dist/LinearSyntenyView/components/Icons.js +0 -12
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -81
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +0 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +0 -39
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +0 -7
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +0 -22
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +0 -11
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.js +0 -58
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +0 -5
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +0 -60
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +0 -5
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +0 -43
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +0 -117
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +0 -68
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -19
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.js +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +0 -20
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +0 -4
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.js +0 -27
- package/dist/LinearSyntenyView/components/ImportForm/util.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/util.js +0 -24
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +0 -5
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +0 -47
- package/dist/LinearSyntenyView/components/TextField2.d.ts +0 -2
- package/dist/LinearSyntenyView/components/TextField2.js +0 -8
- package/dist/LinearSyntenyView/index.d.ts +0 -2
- package/dist/LinearSyntenyView/index.js +0 -52
- package/dist/LinearSyntenyView/model.d.ts +0 -702
- package/dist/LinearSyntenyView/model.js +0 -240
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +0 -5
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +0 -10
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +0 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +0 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +0 -3
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +0 -80
- package/dist/LinearSyntenyView/types.d.ts +0 -29
- package/dist/LinearSyntenyView/types.js +0 -2
- package/dist/LinearSyntenyView/util/diagonalize.d.ts +0 -27
- package/dist/LinearSyntenyView/util/diagonalize.js +0 -91
- package/dist/LinearSyntenyViewHelper/index.d.ts +0 -2
- package/dist/LinearSyntenyViewHelper/index.js +0 -25
- package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +0 -18
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +0 -78
- package/dist/SyntenyFeatureDetail/Formatter.d.ts +0 -3
- package/dist/SyntenyFeatureDetail/Formatter.js +0 -23
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +0 -7
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +0 -87
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +0 -5
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +0 -19
- package/dist/SyntenyFeatureDetail/index.d.ts +0 -2
- package/dist/SyntenyFeatureDetail/index.js +0 -60
- package/dist/SyntenyFeatureDetail/types.d.ts +0 -9
- package/dist/SyntenyFeatureDetail/types.js +0 -2
- package/dist/SyntenyTrack/configSchema.d.ts +0 -80
- package/dist/SyntenyTrack/configSchema.js +0 -9
- package/dist/SyntenyTrack/index.d.ts +0 -2
- package/dist/SyntenyTrack/index.js +0 -19
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -48
- package/dist/util.d.ts +0 -25
- package/dist/util.js +0 -67
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = Formatter;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
|
|
10
|
-
function Formatter({ value }) {
|
|
11
|
-
const [show, setShow] = (0, react_1.useState)(false);
|
|
12
|
-
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
13
|
-
const display = String(value);
|
|
14
|
-
return display.length > 100 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => {
|
|
15
|
-
(0, copy_to_clipboard_1.default)(display);
|
|
16
|
-
setCopied(true);
|
|
17
|
-
setTimeout(() => {
|
|
18
|
-
setCopied(false);
|
|
19
|
-
}, 700);
|
|
20
|
-
}, children: copied ? 'Copied to clipboard' : 'Copy' }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => {
|
|
21
|
-
setShow(val => !val);
|
|
22
|
-
}, children: show ? 'Show less' : 'Show more' }), (0, jsx_runtime_1.jsx)("div", { children: show ? display : `${display.slice(0, 100)}...` })] })) : ((0, jsx_runtime_1.jsx)("div", { children: display }));
|
|
23
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SyntenyFeatureDetailModel } from './types';
|
|
2
|
-
import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
3
|
-
declare const LinkToSyntenyView: ({ model, feat, }: {
|
|
4
|
-
model: SyntenyFeatureDetailModel;
|
|
5
|
-
feat: SimpleFeatureSerialized;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default LinkToSyntenyView;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
|
-
const react_1 = require("react");
|
|
38
|
-
const util_1 = require("@jbrowse/core/util");
|
|
39
|
-
const material_1 = require("@mui/material");
|
|
40
|
-
const mobx_react_1 = require("mobx-react");
|
|
41
|
-
const LaunchSyntenyViewDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../LGVSyntenyDisplay/components/LaunchSyntenyViewDialog'))));
|
|
42
|
-
const LinkToSyntenyView = (0, mobx_react_1.observer)(function ({ model, feat, }) {
|
|
43
|
-
const { view, level, trackId } = model;
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)("ul", { children: [view.type === 'LinearSyntenyView' ? ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "#", onClick: event => {
|
|
45
|
-
var _a, _b;
|
|
46
|
-
event.preventDefault();
|
|
47
|
-
const { views } = view;
|
|
48
|
-
if (level !== undefined) {
|
|
49
|
-
(_a = views[level]) === null || _a === void 0 ? void 0 : _a.navTo(feat);
|
|
50
|
-
(_b = views[level + 1]) === null || _b === void 0 ? void 0 : _b.navTo(feat.mate);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
const f1 = feat;
|
|
54
|
-
const f2 = feat.mate;
|
|
55
|
-
const r1 = f1.assemblyName;
|
|
56
|
-
const r2 = f2.assemblyName;
|
|
57
|
-
const v1 = views.find(view => view.assemblyNames[0] === r1);
|
|
58
|
-
const v2 = views.find(view => view.assemblyNames[0] === r2);
|
|
59
|
-
if (!v1 || !v2) {
|
|
60
|
-
(0, util_1.getSession)(model).notify([
|
|
61
|
-
v1
|
|
62
|
-
? `Unable to find ${(0, util_1.assembleLocString)(f1)} in synteny view`
|
|
63
|
-
: '',
|
|
64
|
-
v2
|
|
65
|
-
? `Unable to find ${(0, util_1.assembleLocString)(f2)} in synteny view`
|
|
66
|
-
: '',
|
|
67
|
-
].join(' ... '));
|
|
68
|
-
}
|
|
69
|
-
v1 === null || v1 === void 0 ? void 0 : v1.navTo(f1);
|
|
70
|
-
v2 === null || v2 === void 0 ? void 0 : v2.navTo(f2);
|
|
71
|
-
}
|
|
72
|
-
}, children: "Center view on this feature" }) })) : null, (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "#", onClick: event => {
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
const feature = new util_1.SimpleFeature(feat);
|
|
75
|
-
const session = (0, util_1.getSession)(model);
|
|
76
|
-
session.queueDialog(handleClose => [
|
|
77
|
-
LaunchSyntenyViewDialog,
|
|
78
|
-
{
|
|
79
|
-
session,
|
|
80
|
-
feature,
|
|
81
|
-
trackId,
|
|
82
|
-
handleClose,
|
|
83
|
-
},
|
|
84
|
-
]);
|
|
85
|
-
}, children: "Launch new linear synteny view on this feature" }) })] }));
|
|
86
|
-
});
|
|
87
|
-
exports.default = LinkToSyntenyView;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const BaseCard_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard"));
|
|
8
|
-
const FeatureDetails_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails"));
|
|
9
|
-
const material_1 = require("@mui/material");
|
|
10
|
-
const mobx_react_1 = require("mobx-react");
|
|
11
|
-
const Formatter_1 = __importDefault(require("./Formatter"));
|
|
12
|
-
const LinkToSyntenyView_1 = __importDefault(require("./LinkToSyntenyView"));
|
|
13
|
-
const SyntenyFeatureDetail = (0, mobx_react_1.observer)(function (props) {
|
|
14
|
-
const { model } = props;
|
|
15
|
-
const { featureData } = model;
|
|
16
|
-
const feat = structuredClone(featureData);
|
|
17
|
-
return feat ? ((0, jsx_runtime_1.jsxs)(material_1.Paper, { children: [(0, jsx_runtime_1.jsx)(FeatureDetails_1.default, { ...props, feature: feat, formatter: value => (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: value }) }), (0, jsx_runtime_1.jsx)(BaseCard_1.default, { title: "Link to view", children: (0, jsx_runtime_1.jsx)(LinkToSyntenyView_1.default, { model: model, feat: feat }) })] })) : ((0, jsx_runtime_1.jsx)("div", { children: "No feature loaded, may not be available after page refresh because it was too large for localStorage" }));
|
|
18
|
-
});
|
|
19
|
-
exports.default = SyntenyFeatureDetail;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.default = SyntenyFeatureWidgetF;
|
|
40
|
-
const react_1 = require("react");
|
|
41
|
-
const BaseFeatureWidget_1 = require("@jbrowse/core/BaseFeatureWidget");
|
|
42
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
43
|
-
const WidgetType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/WidgetType"));
|
|
44
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
45
|
-
const configSchema = (0, configuration_1.ConfigurationSchema)('SyntenyFeatureWidget', {});
|
|
46
|
-
function stateModelF(pluginManager) {
|
|
47
|
-
return mobx_state_tree_1.types.compose((0, BaseFeatureWidget_1.stateModelFactory)(pluginManager), mobx_state_tree_1.types.model('SyntenyFeatureWidget', {
|
|
48
|
-
type: mobx_state_tree_1.types.literal('SyntenyFeatureWidget'),
|
|
49
|
-
level: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
function SyntenyFeatureWidgetF(pluginManager) {
|
|
53
|
-
pluginManager.addWidgetType(() => new WidgetType_1.default({
|
|
54
|
-
name: 'SyntenyFeatureWidget',
|
|
55
|
-
heading: 'Synteny feature details',
|
|
56
|
-
configSchema,
|
|
57
|
-
stateModel: stateModelF(pluginManager),
|
|
58
|
-
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./SyntenyFeatureDetail')))),
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
name: {
|
|
4
|
-
description: string;
|
|
5
|
-
type: string;
|
|
6
|
-
defaultValue: string;
|
|
7
|
-
};
|
|
8
|
-
assemblyNames: {
|
|
9
|
-
description: string;
|
|
10
|
-
type: string;
|
|
11
|
-
defaultValue: string[];
|
|
12
|
-
};
|
|
13
|
-
description: {
|
|
14
|
-
description: string;
|
|
15
|
-
type: string;
|
|
16
|
-
defaultValue: string;
|
|
17
|
-
};
|
|
18
|
-
category: {
|
|
19
|
-
description: string;
|
|
20
|
-
type: string;
|
|
21
|
-
defaultValue: never[];
|
|
22
|
-
};
|
|
23
|
-
metadata: {
|
|
24
|
-
type: string;
|
|
25
|
-
description: string;
|
|
26
|
-
defaultValue: {};
|
|
27
|
-
};
|
|
28
|
-
adapter: import("mobx-state-tree").IAnyModelType;
|
|
29
|
-
textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
30
|
-
indexingAttributes: {
|
|
31
|
-
type: string;
|
|
32
|
-
description: string;
|
|
33
|
-
defaultValue: string[];
|
|
34
|
-
};
|
|
35
|
-
indexingFeatureTypesToExclude: {
|
|
36
|
-
type: string;
|
|
37
|
-
description: string;
|
|
38
|
-
defaultValue: string[];
|
|
39
|
-
};
|
|
40
|
-
textSearchAdapter: import("mobx-state-tree").IAnyModelType;
|
|
41
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
42
|
-
displays: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
43
|
-
formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
44
|
-
feature: {
|
|
45
|
-
type: string;
|
|
46
|
-
description: string;
|
|
47
|
-
defaultValue: {};
|
|
48
|
-
contextVariable: string[];
|
|
49
|
-
};
|
|
50
|
-
subfeatures: {
|
|
51
|
-
type: string;
|
|
52
|
-
description: string;
|
|
53
|
-
defaultValue: {};
|
|
54
|
-
contextVariable: string[];
|
|
55
|
-
};
|
|
56
|
-
depth: {
|
|
57
|
-
type: string;
|
|
58
|
-
defaultValue: number;
|
|
59
|
-
description: string;
|
|
60
|
-
};
|
|
61
|
-
maxDepth: {
|
|
62
|
-
type: string;
|
|
63
|
-
defaultValue: number;
|
|
64
|
-
description: string;
|
|
65
|
-
};
|
|
66
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
67
|
-
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
68
|
-
config: {
|
|
69
|
-
type: string;
|
|
70
|
-
description: string;
|
|
71
|
-
defaultValue: {};
|
|
72
|
-
contextVariable: string[];
|
|
73
|
-
};
|
|
74
|
-
hideUris: {
|
|
75
|
-
type: string;
|
|
76
|
-
defaultValue: boolean;
|
|
77
|
-
};
|
|
78
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
79
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
|
|
80
|
-
export default configSchema;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
5
|
-
function x() { }
|
|
6
|
-
const configSchema = (pluginManager) => (0, configuration_1.ConfigurationSchema)('SyntenyTrack', {}, {
|
|
7
|
-
baseConfiguration: (0, models_1.createBaseTrackConfig)(pluginManager),
|
|
8
|
-
});
|
|
9
|
-
exports.default = configSchema;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = registerSyntenyTrack;
|
|
7
|
-
const TrackType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/TrackType"));
|
|
8
|
-
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
9
|
-
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
10
|
-
function registerSyntenyTrack(pluginManager) {
|
|
11
|
-
pluginManager.addTrackType(() => {
|
|
12
|
-
const configSchema = (0, configSchema_1.default)(pluginManager);
|
|
13
|
-
return new TrackType_1.default({
|
|
14
|
-
name: 'SyntenyTrack',
|
|
15
|
-
configSchema,
|
|
16
|
-
stateModel: (0, models_1.createBaseTrackModel)(pluginManager, 'SyntenyTrack', configSchema),
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
-
export default class LinearComparativeViewPlugin extends Plugin {
|
|
4
|
-
name: string;
|
|
5
|
-
install(pluginManager: PluginManager): void;
|
|
6
|
-
configure(pluginManager: PluginManager): void;
|
|
7
|
-
}
|
package/dist/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
const CalendarViewDay_1 = __importDefault(require("@mui/icons-material/CalendarViewDay"));
|
|
9
|
-
const LGVSyntenyDisplay_1 = __importDefault(require("./LGVSyntenyDisplay"));
|
|
10
|
-
const LaunchLinearSyntenyView_1 = __importDefault(require("./LaunchLinearSyntenyView"));
|
|
11
|
-
const LinearComparativeDisplay_1 = __importDefault(require("./LinearComparativeDisplay"));
|
|
12
|
-
const LinearComparativeView_1 = __importDefault(require("./LinearComparativeView"));
|
|
13
|
-
const LinearReadVsRef_1 = __importDefault(require("./LinearReadVsRef"));
|
|
14
|
-
const LinearSyntenyDisplay_1 = __importDefault(require("./LinearSyntenyDisplay"));
|
|
15
|
-
const LinearSyntenyView_1 = __importDefault(require("./LinearSyntenyView"));
|
|
16
|
-
const LinearSyntenyViewHelper_1 = __importDefault(require("./LinearSyntenyViewHelper"));
|
|
17
|
-
const SyntenyFeatureDetail_1 = __importDefault(require("./SyntenyFeatureDetail"));
|
|
18
|
-
const SyntenyTrack_1 = __importDefault(require("./SyntenyTrack"));
|
|
19
|
-
class LinearComparativeViewPlugin extends Plugin_1.default {
|
|
20
|
-
constructor() {
|
|
21
|
-
super(...arguments);
|
|
22
|
-
this.name = 'LinearComparativeViewPlugin';
|
|
23
|
-
}
|
|
24
|
-
install(pluginManager) {
|
|
25
|
-
(0, LinearSyntenyViewHelper_1.default)(pluginManager);
|
|
26
|
-
(0, LinearComparativeView_1.default)(pluginManager);
|
|
27
|
-
(0, LinearSyntenyView_1.default)(pluginManager);
|
|
28
|
-
(0, LinearComparativeDisplay_1.default)(pluginManager);
|
|
29
|
-
(0, LinearSyntenyDisplay_1.default)(pluginManager);
|
|
30
|
-
(0, SyntenyFeatureDetail_1.default)(pluginManager);
|
|
31
|
-
(0, LGVSyntenyDisplay_1.default)(pluginManager);
|
|
32
|
-
(0, LaunchLinearSyntenyView_1.default)(pluginManager);
|
|
33
|
-
(0, SyntenyTrack_1.default)(pluginManager);
|
|
34
|
-
(0, LinearReadVsRef_1.default)(pluginManager);
|
|
35
|
-
}
|
|
36
|
-
configure(pluginManager) {
|
|
37
|
-
if ((0, util_1.isAbstractMenuManager)(pluginManager.rootModel)) {
|
|
38
|
-
pluginManager.rootModel.appendToSubMenu(['Add'], {
|
|
39
|
-
label: 'Linear synteny view',
|
|
40
|
-
icon: CalendarViewDay_1.default,
|
|
41
|
-
onClick: (session) => {
|
|
42
|
-
session.addView('LinearSyntenyView', {});
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.default = LinearComparativeViewPlugin;
|
package/dist/util.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
2
|
-
import type { Region } from '@jbrowse/core/util/types';
|
|
3
|
-
export type LayoutRecord = [number, number, number, number];
|
|
4
|
-
export interface ReducedLinearGenomeView {
|
|
5
|
-
bpPerPx: number;
|
|
6
|
-
offsetPx: number;
|
|
7
|
-
staticBlocks: Region[];
|
|
8
|
-
dynamicBlocks: Region[];
|
|
9
|
-
displayedRegions: Region[];
|
|
10
|
-
headerHeight: number;
|
|
11
|
-
scaleBarHeight: number;
|
|
12
|
-
height: number;
|
|
13
|
-
features: Feature[];
|
|
14
|
-
tracks: {
|
|
15
|
-
scrollTop: number;
|
|
16
|
-
height: number;
|
|
17
|
-
configuration: string;
|
|
18
|
-
skip: number;
|
|
19
|
-
}[];
|
|
20
|
-
}
|
|
21
|
-
export declare function cheight(chunk: LayoutRecord): number;
|
|
22
|
-
export declare function getTrackPos(view: ReducedLinearGenomeView, trackConfigId: string): number;
|
|
23
|
-
export declare function getPxFromCoordinate(view: ReducedLinearGenomeView, refName: string, coord: number): number;
|
|
24
|
-
export declare function overlayYPos(trackConfigId: string, level: number, views: ReducedLinearGenomeView[], c: LayoutRecord, cond: boolean): number;
|
|
25
|
-
export declare function interstitialYPos(cond: boolean, height: number): number;
|
package/dist/util.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cheight = cheight;
|
|
4
|
-
exports.getTrackPos = getTrackPos;
|
|
5
|
-
exports.getPxFromCoordinate = getPxFromCoordinate;
|
|
6
|
-
exports.overlayYPos = overlayYPos;
|
|
7
|
-
exports.interstitialYPos = interstitialYPos;
|
|
8
|
-
const util_1 = require("@jbrowse/core/util");
|
|
9
|
-
const [, TOP, , BOTTOM] = [0, 1, 2, 3];
|
|
10
|
-
function cheight(chunk) {
|
|
11
|
-
return chunk[BOTTOM] - chunk[TOP];
|
|
12
|
-
}
|
|
13
|
-
function heightFromSpecificLevel(views, trackConfigId, level) {
|
|
14
|
-
const heightUpUntilThisPoint = views
|
|
15
|
-
.slice(0, level)
|
|
16
|
-
.map(v => v.height + 7)
|
|
17
|
-
.reduce((a, b) => a + b, 0);
|
|
18
|
-
const v = views[level];
|
|
19
|
-
return (heightUpUntilThisPoint +
|
|
20
|
-
v.headerHeight +
|
|
21
|
-
v.scaleBarHeight +
|
|
22
|
-
getTrackPos(v, trackConfigId) +
|
|
23
|
-
1);
|
|
24
|
-
}
|
|
25
|
-
function getTrackPos(view, trackConfigId) {
|
|
26
|
-
const idx = view.tracks.findIndex(t => t.configuration === trackConfigId);
|
|
27
|
-
let accum = 0;
|
|
28
|
-
for (let i = 0; i < idx; i += 1) {
|
|
29
|
-
accum += view.tracks[i].height + 3;
|
|
30
|
-
}
|
|
31
|
-
return accum;
|
|
32
|
-
}
|
|
33
|
-
function getPxFromCoordinate(view, refName, coord) {
|
|
34
|
-
var _a;
|
|
35
|
-
return (((_a = bpToPx(view, { refName, coord })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - view.offsetPx;
|
|
36
|
-
}
|
|
37
|
-
function overlayYPos(trackConfigId, level, views, c, cond) {
|
|
38
|
-
const track = views[level].tracks.find(t => t.configuration === trackConfigId);
|
|
39
|
-
const ypos = track
|
|
40
|
-
? (0, util_1.clamp)(c[TOP] - (track.scrollTop || 0), 0, track.height) +
|
|
41
|
-
heightFromSpecificLevel(views, trackConfigId, level) +
|
|
42
|
-
track.skip
|
|
43
|
-
: 0;
|
|
44
|
-
return ypos + (cond ? cheight(c) : 0);
|
|
45
|
-
}
|
|
46
|
-
function bpToPx(view, { refName, coord }) {
|
|
47
|
-
let offsetBp = 0;
|
|
48
|
-
const index = view.displayedRegions.findIndex(r => {
|
|
49
|
-
if (refName === r.refName && coord >= r.start && coord <= r.end) {
|
|
50
|
-
offsetBp += coord - r.start;
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
offsetBp += r.end - r.start;
|
|
54
|
-
return false;
|
|
55
|
-
});
|
|
56
|
-
const foundRegion = view.displayedRegions[index];
|
|
57
|
-
if (foundRegion) {
|
|
58
|
-
return {
|
|
59
|
-
index,
|
|
60
|
-
offsetPx: Math.round(offsetBp / view.bpPerPx),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
function interstitialYPos(cond, height) {
|
|
66
|
-
return cond ? 0 : height;
|
|
67
|
-
}
|