@jbrowse/plugin-linear-genome-view 2.18.0 → 3.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/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -2
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +17 -44
- package/dist/BaseLinearDisplay/components/Block.d.ts +3 -4
- package/dist/BaseLinearDisplay/components/Block.js +4 -7
- package/dist/BaseLinearDisplay/components/BlockError.d.ts +1 -2
- package/dist/BaseLinearDisplay/components/BlockError.js +9 -15
- package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +1 -2
- package/dist/BaseLinearDisplay/components/BlockMsg.js +3 -8
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +2 -3
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +21 -27
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +1 -2
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +23 -14
- package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -3
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +11 -7
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +7 -4
- package/dist/BaseLinearDisplay/components/Tooltip.js +5 -5
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +7 -7
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +17 -7
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +1 -2
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +2 -2
- package/dist/BaseLinearDisplay/models/renderSvg.d.ts +2 -3
- package/dist/BaseLinearDisplay/models/renderSvg.js +26 -26
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +1 -1
- package/dist/LinearBareDisplay/model.d.ts +6 -6
- package/dist/LinearBasicDisplay/components/AddFiltersDialog.d.ts +1 -2
- package/dist/LinearBasicDisplay/components/AddFiltersDialog.js +16 -57
- package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +1 -2
- package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.js +10 -39
- package/dist/LinearBasicDisplay/model.d.ts +6 -6
- package/dist/LinearBasicDisplay/model.js +17 -7
- package/dist/LinearGenomeView/components/CenterLine.d.ts +1 -2
- package/dist/LinearGenomeView/components/CenterLine.js +7 -33
- package/dist/LinearGenomeView/components/Cytobands.d.ts +1 -2
- package/dist/LinearGenomeView/components/Cytobands.js +28 -31
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +34 -72
- package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +1 -2
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +27 -62
- package/dist/LinearGenomeView/components/Gridlines.d.ts +1 -2
- package/dist/LinearGenomeView/components/Gridlines.js +23 -28
- package/dist/LinearGenomeView/components/Header.d.ts +3 -5
- package/dist/LinearGenomeView/components/Header.js +10 -61
- package/dist/LinearGenomeView/components/HeaderPanControls.d.ts +6 -0
- package/dist/LinearGenomeView/components/HeaderPanControls.js +30 -0
- package/dist/LinearGenomeView/components/HeaderRegionWidth.d.ts +5 -0
- package/dist/LinearGenomeView/components/HeaderRegionWidth.js +21 -0
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +5 -0
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.js +19 -0
- package/dist/LinearGenomeView/components/HeaderZoomControls.d.ts +5 -0
- package/dist/LinearGenomeView/components/HeaderZoomControls.js +103 -0
- package/dist/LinearGenomeView/components/Highlight.d.ts +9 -4
- package/dist/LinearGenomeView/components/Highlight.js +32 -58
- package/dist/LinearGenomeView/components/ImportForm.d.ts +1 -2
- package/dist/LinearGenomeView/components/ImportForm.js +31 -67
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +1 -2
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +2 -2
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +1 -2
- package/dist/LinearGenomeView/components/LinearGenomeView.js +24 -17
- package/dist/LinearGenomeView/components/MiniControls.d.ts +1 -2
- package/dist/LinearGenomeView/components/MiniControls.js +6 -13
- package/dist/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -2
- package/dist/LinearGenomeView/components/NoTracksActiveButton.js +2 -7
- package/dist/LinearGenomeView/components/OverviewHighlight.d.ts +1 -2
- package/dist/LinearGenomeView/components/OverviewHighlight.js +3 -6
- package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +1 -2
- package/dist/LinearGenomeView/components/OverviewRubberband.js +6 -33
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +1 -2
- package/dist/LinearGenomeView/components/OverviewScalebar.js +30 -64
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +1 -2
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.js +2 -5
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +1 -2
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.js +3 -6
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +1 -2
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +3 -3
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +1 -2
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +25 -22
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +1 -2
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +4 -43
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -2
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +21 -10
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +6 -0
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.js +30 -0
- package/dist/LinearGenomeView/components/Rubberband.d.ts +1 -2
- package/dist/LinearGenomeView/components/Rubberband.js +7 -32
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +1 -2
- package/dist/LinearGenomeView/components/RubberbandSpan.js +16 -34
- package/dist/LinearGenomeView/components/Scalebar.d.ts +1 -1
- package/dist/LinearGenomeView/components/Scalebar.js +10 -13
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -2
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.js +17 -17
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +1 -2
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.js +9 -12
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -2
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.js +12 -19
- package/dist/LinearGenomeView/components/SearchBox.d.ts +1 -2
- package/dist/LinearGenomeView/components/SearchBox.js +2 -2
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -2
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +4 -14
- package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +1 -2
- package/dist/LinearGenomeView/components/SearchResultsTable.js +15 -31
- package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +1 -2
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js +39 -72
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +1 -2
- package/dist/LinearGenomeView/components/TrackContainer.js +10 -36
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +1 -2
- package/dist/LinearGenomeView/components/TrackLabel.js +10 -78
- package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +1 -2
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +2 -2
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.d.ts +1 -2
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.js +3 -4
- package/dist/LinearGenomeView/components/TrackLabelMenu.d.ts +5 -0
- package/dist/LinearGenomeView/components/TrackLabelMenu.js +79 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +10 -37
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -2
- package/dist/LinearGenomeView/components/TracksContainer.js +33 -27
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +1 -2
- package/dist/LinearGenomeView/components/VerticalGuide.js +3 -7
- package/dist/LinearGenomeView/components/useRangeSelect.d.ts +1 -1
- package/dist/LinearGenomeView/components/useWheelScroll.d.ts +1 -1
- package/dist/LinearGenomeView/components/useWheelScroll.js +1 -1
- package/dist/LinearGenomeView/index.js +17 -7
- package/dist/LinearGenomeView/model.d.ts +1 -39
- package/dist/LinearGenomeView/model.js +28 -31
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +2 -5
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +2 -12
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +2 -12
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +2 -5
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +17 -29
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +2 -9
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +2 -5
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +1 -2
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +18 -15
- package/dist/LinearGenomeView/types.d.ts +38 -0
- package/dist/LinearGenomeView/types.js +2 -0
- package/dist/LinearGenomeView/util.d.ts +3 -1
- package/dist/LinearGenomeView/util.js +16 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.js +19 -8
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -2
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +17 -21
- package/esm/BaseLinearDisplay/components/Block.d.ts +3 -4
- package/esm/BaseLinearDisplay/components/Block.js +4 -4
- package/esm/BaseLinearDisplay/components/BlockError.d.ts +1 -2
- package/esm/BaseLinearDisplay/components/BlockError.js +9 -15
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +1 -2
- package/esm/BaseLinearDisplay/components/BlockMsg.js +3 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +2 -3
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +21 -24
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +1 -2
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +6 -7
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -3
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +11 -7
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +7 -4
- package/esm/BaseLinearDisplay/components/Tooltip.js +5 -5
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +7 -7
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +1 -2
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +2 -2
- package/esm/BaseLinearDisplay/models/renderSvg.d.ts +2 -3
- package/esm/BaseLinearDisplay/models/renderSvg.js +9 -16
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +1 -1
- package/esm/LinearBareDisplay/model.d.ts +6 -6
- package/esm/LinearBasicDisplay/components/AddFiltersDialog.d.ts +1 -2
- package/esm/LinearBasicDisplay/components/AddFiltersDialog.js +16 -34
- package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +1 -2
- package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.js +10 -16
- package/esm/LinearBasicDisplay/model.d.ts +6 -6
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -2
- package/esm/LinearGenomeView/components/CenterLine.js +7 -10
- package/esm/LinearGenomeView/components/Cytobands.d.ts +1 -2
- package/esm/LinearGenomeView/components/Cytobands.js +28 -28
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +34 -49
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +1 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +27 -39
- package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -2
- package/esm/LinearGenomeView/components/Gridlines.js +23 -25
- package/esm/LinearGenomeView/components/Header.d.ts +3 -5
- package/esm/LinearGenomeView/components/Header.js +11 -62
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +6 -0
- package/esm/LinearGenomeView/components/HeaderPanControls.js +24 -0
- package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +19 -0
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +17 -0
- package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +65 -0
- package/esm/LinearGenomeView/components/Highlight.d.ts +9 -4
- package/esm/LinearGenomeView/components/Highlight.js +32 -35
- package/esm/LinearGenomeView/components/ImportForm.d.ts +1 -2
- package/esm/LinearGenomeView/components/ImportForm.js +32 -45
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +1 -2
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +2 -2
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -2
- package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -10
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -2
- package/esm/LinearGenomeView/components/MiniControls.js +6 -13
- package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -2
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +2 -4
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +1 -2
- package/esm/LinearGenomeView/components/OverviewHighlight.js +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +1 -2
- package/esm/LinearGenomeView/components/OverviewRubberband.js +6 -10
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +1 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +30 -41
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +1 -2
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +2 -2
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +1 -2
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +3 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +1 -2
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +3 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +1 -2
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +8 -15
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +1 -2
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +4 -40
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -2
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +4 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +6 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +28 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -2
- package/esm/LinearGenomeView/components/Rubberband.js +7 -9
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +1 -2
- package/esm/LinearGenomeView/components/RubberbandSpan.js +16 -11
- package/esm/LinearGenomeView/components/Scalebar.d.ts +1 -1
- package/esm/LinearGenomeView/components/Scalebar.js +10 -13
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -2
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +17 -17
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +1 -2
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.js +9 -9
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -2
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +12 -16
- package/esm/LinearGenomeView/components/SearchBox.d.ts +1 -2
- package/esm/LinearGenomeView/components/SearchBox.js +2 -2
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -2
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +4 -14
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +1 -2
- package/esm/LinearGenomeView/components/SearchResultsTable.js +15 -28
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +1 -2
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +39 -49
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackContainer.js +10 -13
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackLabel.js +10 -78
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +2 -2
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +3 -4
- package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +5 -0
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +74 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +10 -14
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -2
- package/esm/LinearGenomeView/components/TracksContainer.js +16 -20
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -2
- package/esm/LinearGenomeView/components/VerticalGuide.js +3 -4
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +1 -1
- package/esm/LinearGenomeView/components/useWheelScroll.d.ts +1 -1
- package/esm/LinearGenomeView/components/useWheelScroll.js +1 -1
- package/esm/LinearGenomeView/model.d.ts +1 -39
- package/esm/LinearGenomeView/model.js +10 -22
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +2 -12
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +2 -12
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +17 -29
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +2 -6
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +1 -2
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +18 -15
- package/esm/LinearGenomeView/types.d.ts +38 -0
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +3 -1
- package/esm/LinearGenomeView/util.js +16 -1
- package/esm/index.d.ts +10 -10
- package/esm/index.js +2 -1
- package/package.json +2 -2
- package/dist/LinearGenomeView/components/ZoomControls.d.ts +0 -6
- package/dist/LinearGenomeView/components/ZoomControls.js +0 -66
- package/esm/LinearGenomeView/components/ZoomControls.d.ts +0 -6
- package/esm/LinearGenomeView/components/ZoomControls.js +0 -38
|
@@ -15,33 +15,44 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
const react_1 = require("react");
|
|
30
41
|
const ui_1 = require("@jbrowse/core/ui");
|
|
31
42
|
const util_1 = require("@jbrowse/core/util");
|
|
32
43
|
const mobx_react_1 = require("mobx-react");
|
|
33
44
|
const mui_1 = require("tss-react/mui");
|
|
34
|
-
const CenterLine_1 = __importDefault(require("./CenterLine"));
|
|
35
45
|
const Gridlines_1 = __importDefault(require("./Gridlines"));
|
|
36
|
-
const Highlight_1 = __importDefault(require("./Highlight"));
|
|
37
46
|
const Rubberband_1 = __importDefault(require("./Rubberband"));
|
|
38
|
-
const RubberbandSpan_1 = __importDefault(require("./RubberbandSpan"));
|
|
39
47
|
const Scalebar_1 = __importDefault(require("./Scalebar"));
|
|
40
48
|
const VerticalGuide_1 = __importDefault(require("./VerticalGuide"));
|
|
41
49
|
const consts_1 = require("../consts");
|
|
42
50
|
const useRangeSelect_1 = require("./useRangeSelect");
|
|
43
51
|
const useSideScroll_1 = require("./useSideScroll");
|
|
44
52
|
const useWheelScroll_1 = require("./useWheelScroll");
|
|
53
|
+
const CenterLine = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./CenterLine'))));
|
|
54
|
+
const Highlight = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./Highlight'))));
|
|
55
|
+
const RubberbandSpan = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./RubberbandSpan'))));
|
|
45
56
|
const useStyles = (0, mui_1.makeStyles)()({
|
|
46
57
|
tracksContainer: {
|
|
47
58
|
position: 'relative',
|
|
@@ -57,23 +68,18 @@ const TracksContainer = (0, mobx_react_1.observer)(function TracksContainer({ ch
|
|
|
57
68
|
const { guideX, rubberbandOn, leftBpOffset, rightBpOffset, numOfBpSelected, width, left, anchorPosition, open, handleMenuItemClick, handleClose, mouseMove, mouseDown: mouseDown2, } = (0, useRangeSelect_1.useRangeSelect)(ref, model, true);
|
|
58
69
|
(0, useWheelScroll_1.useWheelScroll)(ref, model);
|
|
59
70
|
const additional = pluginManager.evaluateExtensionPoint('LinearGenomeView-TracksContainerComponent', undefined, { model });
|
|
60
|
-
return (
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, "data-testid": "trackContainer", className: classes.tracksContainer, onMouseDown: event => {
|
|
61
72
|
mouseDown1(event);
|
|
62
73
|
mouseDown2(event);
|
|
63
|
-
}, onMouseMove: mouseMove, onMouseUp: mouseUp },
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
boxSizing: 'border-box',
|
|
74
|
-
} }) }),
|
|
75
|
-
react_1.default.createElement(Highlight_1.default, { model: model }),
|
|
76
|
-
additional,
|
|
77
|
-
children));
|
|
74
|
+
}, onMouseMove: mouseMove, onMouseUp: mouseUp, children: [showGridlines ? (0, jsx_runtime_1.jsx)(Gridlines_1.default, { model: model }) : null, (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: showCenterLine ? (0, jsx_runtime_1.jsx)(CenterLine, { model: model }) : null }), guideX !== undefined ? ((0, jsx_runtime_1.jsx)(VerticalGuide_1.default, { model: model, coordX: guideX })) : rubberbandOn ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, numOfBpSelected: numOfBpSelected, width: width, left: left }) })) : null, anchorPosition ? ((0, jsx_runtime_1.jsx)(ui_1.Menu, { anchorReference: "anchorPosition", anchorPosition: {
|
|
75
|
+
left: anchorPosition.clientX,
|
|
76
|
+
top: anchorPosition.clientY,
|
|
77
|
+
}, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems: model.rubberBandMenuItems() })) : null, (0, jsx_runtime_1.jsx)(Rubberband_1.default, { model: model, ControlComponent: (0, jsx_runtime_1.jsx)(Scalebar_1.default, { model: model, style: {
|
|
78
|
+
height: consts_1.SCALE_BAR_HEIGHT,
|
|
79
|
+
boxSizing: 'border-box',
|
|
80
|
+
} }) }), (0, jsx_runtime_1.jsx)(HighlightGroup, { model: model }), additional, children] }));
|
|
81
|
+
});
|
|
82
|
+
const HighlightGroup = (0, mobx_react_1.observer)(function HighlightGroup({ model, }) {
|
|
83
|
+
return model.highlight.length ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => ((0, jsx_runtime_1.jsx)(Highlight, { model: model, highlight: highlight }, `${JSON.stringify(highlight)}-${idx}`))) })) : null;
|
|
78
84
|
});
|
|
79
85
|
exports.default = TracksContainer;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
3
|
declare const VerticalGuide: ({ model, coordX, }: {
|
|
5
4
|
model: LGV;
|
|
6
5
|
coordX: number;
|
|
7
|
-
}) =>
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default VerticalGuide;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const util_1 = require("@jbrowse/core/util");
|
|
8
5
|
const material_1 = require("@mui/material");
|
|
9
6
|
const mobx_react_1 = require("mobx-react");
|
|
@@ -19,10 +16,9 @@ const useStyles = (0, mui_1.makeStyles)()({
|
|
|
19
16
|
});
|
|
20
17
|
const VerticalGuide = (0, mobx_react_1.observer)(function VerticalGuide({ model, coordX, }) {
|
|
21
18
|
const { classes } = useStyles();
|
|
22
|
-
return (
|
|
23
|
-
react_1.default.createElement("div", { className: classes.guide, style: {
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { open: true, placement: "top", title: (0, util_1.stringify)(model.pxToBp(coordX)), arrow: true, children: (0, jsx_runtime_1.jsx)("div", { className: classes.guide, style: {
|
|
24
20
|
left: coordX,
|
|
25
21
|
background: 'red',
|
|
26
|
-
} })));
|
|
22
|
+
} }) }));
|
|
27
23
|
});
|
|
28
24
|
exports.default = VerticalGuide;
|
|
@@ -5,7 +5,7 @@ interface AnchorPosition {
|
|
|
5
5
|
clientX: number;
|
|
6
6
|
clientY: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function useRangeSelect(ref: React.RefObject<HTMLDivElement>, model: LinearGenomeViewModel, shiftOnly?: boolean): {
|
|
8
|
+
export declare function useRangeSelect(ref: React.RefObject<HTMLDivElement | null>, model: LinearGenomeViewModel, shiftOnly?: boolean): {
|
|
9
9
|
open: boolean;
|
|
10
10
|
guideX: number | undefined;
|
|
11
11
|
mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
export declare function useWheelScroll(ref: React.RefObject<HTMLDivElement>, model: {
|
|
2
|
+
export declare function useWheelScroll(ref: React.RefObject<HTMLDivElement | null>, model: {
|
|
3
3
|
bpPerPx: number;
|
|
4
4
|
zoomTo: (arg: number, arg2?: number) => void;
|
|
5
5
|
setScaleFactor: (arg: number) => void;
|
|
@@ -4,7 +4,7 @@ exports.useWheelScroll = useWheelScroll;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useWheelScroll(ref, model) {
|
|
6
6
|
const delta = (0, react_1.useRef)(0);
|
|
7
|
-
const timeout = (0, react_1.useRef)();
|
|
7
|
+
const timeout = (0, react_1.useRef)(null);
|
|
8
8
|
const scheduled = (0, react_1.useRef)(false);
|
|
9
9
|
(0, react_1.useEffect)(() => {
|
|
10
10
|
const curr = ref.current;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { BpOffset, ExportSvgOptions, HighlightType, NavLocation } from './types';
|
|
2
3
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
4
|
import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
4
5
|
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
@@ -7,44 +8,6 @@ import type { ParsedLocString } from '@jbrowse/core/util';
|
|
|
7
8
|
import type { BaseBlock, BlockSet } from '@jbrowse/core/util/blockTypes';
|
|
8
9
|
import type { Region } from '@jbrowse/core/util/types';
|
|
9
10
|
import type { Instance } from 'mobx-state-tree';
|
|
10
|
-
export interface BpOffset {
|
|
11
|
-
refName?: string;
|
|
12
|
-
index: number;
|
|
13
|
-
offset: number;
|
|
14
|
-
start?: number;
|
|
15
|
-
end?: number;
|
|
16
|
-
coord?: number;
|
|
17
|
-
reversed?: boolean;
|
|
18
|
-
assemblyName?: string;
|
|
19
|
-
oob?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface ExportSvgOptions {
|
|
22
|
-
rasterizeLayers?: boolean;
|
|
23
|
-
filename?: string;
|
|
24
|
-
Wrapper?: React.FC<{
|
|
25
|
-
children: React.ReactNode;
|
|
26
|
-
}>;
|
|
27
|
-
fontSize?: number;
|
|
28
|
-
rulerHeight?: number;
|
|
29
|
-
textHeight?: number;
|
|
30
|
-
paddingHeight?: number;
|
|
31
|
-
headerHeight?: number;
|
|
32
|
-
cytobandHeight?: number;
|
|
33
|
-
trackLabels?: string;
|
|
34
|
-
themeName?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface HighlightType {
|
|
37
|
-
start: number;
|
|
38
|
-
end: number;
|
|
39
|
-
assemblyName: string;
|
|
40
|
-
refName: string;
|
|
41
|
-
}
|
|
42
|
-
export interface NavLocation {
|
|
43
|
-
refName: string;
|
|
44
|
-
start?: number;
|
|
45
|
-
end?: number;
|
|
46
|
-
assemblyName?: string;
|
|
47
|
-
}
|
|
48
11
|
export declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
49
12
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
50
13
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -271,5 +234,4 @@ export type LinearGenomeViewModel = Instance<LinearGenomeViewStateModel>;
|
|
|
271
234
|
export { default as LinearGenomeView, default as ReactComponent, } from './components/LinearGenomeView';
|
|
272
235
|
export { default as RefNameAutocomplete } from './components/RefNameAutocomplete';
|
|
273
236
|
export { default as SearchBox } from './components/SearchBox';
|
|
274
|
-
export { default as ZoomControls } from './components/ZoomControls';
|
|
275
237
|
export { renderToSvg } from './svgcomponents/SVGLinearGenomeView';
|
|
@@ -15,18 +15,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.renderToSvg = exports.
|
|
39
|
+
exports.renderToSvg = exports.SearchBox = exports.RefNameAutocomplete = exports.ReactComponent = exports.LinearGenomeView = void 0;
|
|
30
40
|
exports.stateModelFactory = stateModelFactory;
|
|
31
41
|
const react_1 = require("react");
|
|
32
42
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
@@ -61,19 +71,6 @@ const SequenceSearchDialog = (0, react_1.lazy)(() => Promise.resolve().then(() =
|
|
|
61
71
|
const ExportSvgDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ExportSvgDialog'))));
|
|
62
72
|
const GetSequenceDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/GetSequenceDialog'))));
|
|
63
73
|
const SearchResultsDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SearchResultsDialog'))));
|
|
64
|
-
function calculateVisibleLocStrings(contentBlocks) {
|
|
65
|
-
if (!contentBlocks.length) {
|
|
66
|
-
return '';
|
|
67
|
-
}
|
|
68
|
-
const isSingleAssemblyName = contentBlocks.every(b => b.assemblyName === contentBlocks[0].assemblyName);
|
|
69
|
-
const locs = contentBlocks.map(block => (0, util_1.assembleLocString)({
|
|
70
|
-
...block,
|
|
71
|
-
start: Math.round(block.start),
|
|
72
|
-
end: Math.round(block.end),
|
|
73
|
-
assemblyName: isSingleAssemblyName ? undefined : block.assemblyName,
|
|
74
|
-
}));
|
|
75
|
-
return locs.join(' ');
|
|
76
|
-
}
|
|
77
74
|
function stateModelFactory(pluginManager) {
|
|
78
75
|
return mobx_state_tree_1.types
|
|
79
76
|
.compose('LinearGenomeView', models_1.BaseViewModel, mobx_state_tree_1.types.model({
|
|
@@ -87,13 +84,13 @@ function stateModelFactory(pluginManager) {
|
|
|
87
84
|
hideHeaderOverview: false,
|
|
88
85
|
hideNoTracksActive: false,
|
|
89
86
|
trackSelectorType: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.enumeration(['hierarchical']), 'hierarchical'),
|
|
90
|
-
showCenterLine: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () =>
|
|
91
|
-
showCytobandsSetting: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () =>
|
|
87
|
+
showCenterLine: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () => (0, util_1.localStorageGetBoolean)('lgv-showCenterLine', false)),
|
|
88
|
+
showCytobandsSetting: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () => (0, util_1.localStorageGetBoolean)('lgv-showCytobands', true)),
|
|
92
89
|
trackLabels: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.string, () => (0, util_1.localStorageGetItem)('lgv-trackLabels') || ''),
|
|
93
90
|
showGridlines: true,
|
|
94
91
|
highlight: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.array(mobx_state_tree_1.types.frozen()), []),
|
|
95
|
-
colorByCDS: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () =>
|
|
96
|
-
showTrackOutlines: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () =>
|
|
92
|
+
colorByCDS: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () => (0, util_1.localStorageGetBoolean)('lgv-colorByCDS', false)),
|
|
93
|
+
showTrackOutlines: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.boolean, () => (0, util_1.localStorageGetBoolean)('lgv-showTrackOutlines', true)),
|
|
97
94
|
}))
|
|
98
95
|
.volatile(() => ({
|
|
99
96
|
volatileWidth: undefined,
|
|
@@ -175,10 +172,12 @@ function stateModelFactory(pluginManager) {
|
|
|
175
172
|
if (self.hideHeader) {
|
|
176
173
|
return 0;
|
|
177
174
|
}
|
|
178
|
-
if (self.hideHeaderOverview) {
|
|
175
|
+
else if (self.hideHeaderOverview) {
|
|
179
176
|
return consts_1.HEADER_BAR_HEIGHT;
|
|
180
177
|
}
|
|
181
|
-
|
|
178
|
+
else {
|
|
179
|
+
return consts_1.HEADER_BAR_HEIGHT + consts_1.HEADER_OVERVIEW_HEIGHT;
|
|
180
|
+
}
|
|
182
181
|
},
|
|
183
182
|
get trackHeights() {
|
|
184
183
|
return (0, util_1.sum)(self.tracks.map(t => t.displays[0].height));
|
|
@@ -786,10 +785,10 @@ function stateModelFactory(pluginManager) {
|
|
|
786
785
|
}));
|
|
787
786
|
},
|
|
788
787
|
get visibleLocStrings() {
|
|
789
|
-
return calculateVisibleLocStrings(this.dynamicBlocks.contentBlocks);
|
|
788
|
+
return (0, util_2.calculateVisibleLocStrings)(this.dynamicBlocks.contentBlocks);
|
|
790
789
|
},
|
|
791
790
|
get coarseVisibleLocStrings() {
|
|
792
|
-
return calculateVisibleLocStrings(self.coarseDynamicBlocks);
|
|
791
|
+
return (0, util_2.calculateVisibleLocStrings)(self.coarseDynamicBlocks);
|
|
793
792
|
},
|
|
794
793
|
};
|
|
795
794
|
})
|
|
@@ -999,7 +998,5 @@ var RefNameAutocomplete_1 = require("./components/RefNameAutocomplete");
|
|
|
999
998
|
Object.defineProperty(exports, "RefNameAutocomplete", { enumerable: true, get: function () { return __importDefault(RefNameAutocomplete_1).default; } });
|
|
1000
999
|
var SearchBox_1 = require("./components/SearchBox");
|
|
1001
1000
|
Object.defineProperty(exports, "SearchBox", { enumerable: true, get: function () { return __importDefault(SearchBox_1).default; } });
|
|
1002
|
-
var ZoomControls_1 = require("./components/ZoomControls");
|
|
1003
|
-
Object.defineProperty(exports, "ZoomControls", { enumerable: true, get: function () { return __importDefault(ZoomControls_1).default; } });
|
|
1004
1001
|
var SVGLinearGenomeView_1 = require("./svgcomponents/SVGLinearGenomeView");
|
|
1005
1002
|
Object.defineProperty(exports, "renderToSvg", { enumerable: true, get: function () { return SVGLinearGenomeView_1.renderToSvg; } });
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.default = SVGBackground;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const util_1 = require("@jbrowse/core/util");
|
|
9
6
|
const material_1 = require("@mui/material");
|
|
10
7
|
function SVGBackground({ width, height, shift, }) {
|
|
11
8
|
const theme = (0, material_1.useTheme)();
|
|
12
|
-
return (
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)("rect", { width: width + shift * 2, height: height, fill: (0, util_1.stripAlpha)(theme.palette.background.default) }));
|
|
13
10
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
export default function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight, }: {
|
|
4
3
|
model: LinearGenomeViewModel;
|
|
5
4
|
rulerHeight: number;
|
|
6
5
|
fontSize: number;
|
|
7
6
|
cytobandHeight: number;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = SVGHeader;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
9
|
const Base1DViewModel_1 = __importDefault(require("@jbrowse/core/util/Base1DViewModel"));
|
|
10
10
|
const material_1 = require("@mui/material");
|
|
@@ -43,15 +43,5 @@ function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight, }) {
|
|
|
43
43
|
coord: last.reversed ? last.start : last.end,
|
|
44
44
|
}) || 0;
|
|
45
45
|
const y = +showCytobands * cytobandHeight;
|
|
46
|
-
return (
|
|
47
|
-
react_1.default.createElement("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c }, assemblyName),
|
|
48
|
-
showCytobands ? (react_1.default.createElement("g", { transform: `translate(0 ${rulerHeight})` },
|
|
49
|
-
react_1.default.createElement(Cytobands_1.default, { overview: overview, assembly: assembly, block: block }),
|
|
50
|
-
react_1.default.createElement("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: consts_1.HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }),
|
|
51
|
-
react_1.default.createElement("g", { transform: `translate(0,${consts_1.HEADER_OVERVIEW_HEIGHT})` },
|
|
52
|
-
react_1.default.createElement(OverviewScalebarPolygon_1.default, { overview: overview, model: model, useOffset: false })))) : null,
|
|
53
|
-
react_1.default.createElement("g", { transform: `translate(0 ${fontSize + y})` },
|
|
54
|
-
react_1.default.createElement(SVGScalebar_1.default, { model: model, fontSize: fontSize })),
|
|
55
|
-
react_1.default.createElement("g", { transform: `translate(0 ${rulerHeight + y})` },
|
|
56
|
-
react_1.default.createElement(SVGRuler_1.default, { model: model, fontSize: fontSize }))));
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)("g", { id: "header", children: [(0, jsx_runtime_1.jsx)("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: assemblyName }), showCytobands ? ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(0 ${rulerHeight})`, children: [(0, jsx_runtime_1.jsx)(Cytobands_1.default, { overview: overview, assembly: assembly, block: block }), (0, jsx_runtime_1.jsx)("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: consts_1.HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0,${consts_1.HEADER_OVERVIEW_HEIGHT})`, children: (0, jsx_runtime_1.jsx)(OverviewScalebarPolygon_1.default, { overview: overview, model: model, useOffset: false }) })] })) : null, (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${fontSize + y})`, children: (0, jsx_runtime_1.jsx)(SVGScalebar_1.default, { model: model, fontSize: fontSize }) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${rulerHeight + y})`, children: (0, jsx_runtime_1.jsx)(SVGRuler_1.default, { model: model, fontSize: fontSize }) })] }));
|
|
57
47
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LinearGenomeViewModel } from '..';
|
|
2
|
+
import type { ExportSvgOptions } from '../types';
|
|
2
3
|
type LGV = LinearGenomeViewModel;
|
|
3
4
|
export declare function renderToSvg(model: LGV, opts: ExportSvgOptions): Promise<string>;
|
|
4
5
|
export { default as SVGRuler } from './SVGRuler';
|
|
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SVGTracks = exports.SVGRuler = void 0;
|
|
7
7
|
exports.renderToSvg = renderToSvg;
|
|
8
|
-
const
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
9
|
const ui_1 = require("@jbrowse/core/ui");
|
|
10
10
|
const util_1 = require("@jbrowse/core/util");
|
|
11
11
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
12
12
|
const material_1 = require("@mui/material");
|
|
13
13
|
const mobx_1 = require("mobx");
|
|
14
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
15
14
|
const SVGBackground_1 = __importDefault(require("./SVGBackground"));
|
|
16
15
|
const SVGHeader_1 = __importDefault(require("./SVGHeader"));
|
|
17
16
|
const SVGTracks_1 = __importDefault(require("./SVGTracks"));
|
|
@@ -21,7 +20,6 @@ async function renderToSvg(model, opts) {
|
|
|
21
20
|
const { textHeight = 18, headerHeight = 40, rulerHeight = 50, fontSize = 13, cytobandHeight = 100, trackLabels = 'offset', themeName = 'default', Wrapper = ({ children }) => children, } = opts;
|
|
22
21
|
const session = (0, util_1.getSession)(model);
|
|
23
22
|
const { allThemes } = session;
|
|
24
|
-
const { createRootFn } = (0, mobx_state_tree_1.getRoot)(model);
|
|
25
23
|
const theme = allThemes === null || allThemes === void 0 ? void 0 : allThemes()[themeName];
|
|
26
24
|
const { width, tracks, showCytobands } = model;
|
|
27
25
|
const shift = 50;
|
|
@@ -36,15 +34,7 @@ async function renderToSvg(model, opts) {
|
|
|
36
34
|
const trackLabelMaxLen = (0, util_1.max)(tracks.map(t => (0, util_1.measureText)((0, tracks_1.getTrackName)(t.configuration, session), fontSize)), 0) + 40;
|
|
37
35
|
const trackLabelOffset = trackLabels === 'left' ? trackLabelMaxLen : 0;
|
|
38
36
|
const w = width + trackLabelOffset;
|
|
39
|
-
return (0, util_1.renderToStaticMarkup)(
|
|
40
|
-
react_1.default.createElement(Wrapper, null,
|
|
41
|
-
react_1.default.createElement("svg", { width: w, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, height].toString() },
|
|
42
|
-
react_1.default.createElement(SVGBackground_1.default, { width: w, height: height, shift: shift }),
|
|
43
|
-
react_1.default.createElement("g", { transform: `translate(${shift} 0)` },
|
|
44
|
-
react_1.default.createElement("g", { transform: `translate(${trackLabelOffset})` },
|
|
45
|
-
react_1.default.createElement(SVGHeader_1.default, { model: model, fontSize: fontSize, rulerHeight: rulerHeight, cytobandHeight: cytobandHeight })),
|
|
46
|
-
react_1.default.createElement("g", { transform: `translate(0 ${offset})` },
|
|
47
|
-
react_1.default.createElement(SVGTracks_1.default, { textHeight: textHeight, fontSize: fontSize, model: model, displayResults: displayResults, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset })))))), createRootFn);
|
|
37
|
+
return (0, util_1.renderToStaticMarkup)((0, jsx_runtime_1.jsx)(material_1.ThemeProvider, { theme: (0, ui_1.createJBrowseTheme)(theme), children: (0, jsx_runtime_1.jsx)(Wrapper, { children: (0, jsx_runtime_1.jsxs)("svg", { width: w, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, height].toString(), children: [(0, jsx_runtime_1.jsx)(SVGBackground_1.default, { width: w, height: height, shift: shift }), (0, jsx_runtime_1.jsxs)("g", { transform: `translate(${shift} 0)`, children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${trackLabelOffset})`, children: (0, jsx_runtime_1.jsx)(SVGHeader_1.default, { model: model, fontSize: fontSize, rulerHeight: rulerHeight, cytobandHeight: cytobandHeight }) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${offset})`, children: (0, jsx_runtime_1.jsx)(SVGTracks_1.default, { textHeight: textHeight, fontSize: fontSize, model: model, displayResults: displayResults, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset }) })] })] }) }) }));
|
|
48
38
|
}
|
|
49
39
|
var SVGRuler_1 = require("./SVGRuler");
|
|
50
40
|
Object.defineProperty(exports, "SVGRuler", { enumerable: true, get: function () { return __importDefault(SVGRuler_1).default; } });
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
3
|
export default function SVGRegionSeparators({ model, height, }: {
|
|
5
4
|
height: number;
|
|
6
5
|
model: LGV;
|
|
7
|
-
}):
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.default = SVGRegionSeparators;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
function SVGRegionSeparators({ model, height, }) {
|
|
9
6
|
const { dynamicBlocks, offsetPx, interRegionPaddingWidth } = model;
|
|
10
|
-
return (
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: dynamicBlocks.contentBlocks.slice(1).map(block => ((0, jsx_runtime_1.jsx)("rect", { x: block.offsetPx - offsetPx - interRegionPaddingWidth, width: interRegionPaddingWidth, y: 0, height: height, fill: "grey" }, block.key))) }));
|
|
11
8
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
3
|
export default function SVGRuler({ model, fontSize, }: {
|
|
5
4
|
model: LGV;
|
|
6
5
|
fontSize: number;
|
|
7
|
-
}):
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = SVGRuler;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
9
|
const material_1 = require("@mui/material");
|
|
10
10
|
const util_2 = require("../util");
|
|
@@ -13,39 +13,27 @@ function Ruler({ start, end, bpPerPx, reversed = false, major = true, minor = tr
|
|
|
13
13
|
const ticks = (0, util_2.makeTicks)(start, end, bpPerPx, major, minor);
|
|
14
14
|
const theme = (0, material_1.useTheme)();
|
|
15
15
|
const c = (0, util_1.stripAlpha)(theme.palette.text.secondary);
|
|
16
|
-
return (
|
|
17
|
-
ticks.map(tick => {
|
|
18
|
-
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
19
|
-
return (react_1.default.createElement("line", { key: `tick-${tick.base}`, x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: c }));
|
|
20
|
-
}),
|
|
21
|
-
!hideText
|
|
22
|
-
? ticks
|
|
23
|
-
.filter(tick => tick.type === 'major')
|
|
24
|
-
.map(tick => {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [ticks.map(tick => {
|
|
25
17
|
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
26
|
-
return (
|
|
27
|
-
})
|
|
28
|
-
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("line", { x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: c }, `tick-${tick.base}`));
|
|
19
|
+
}), !hideText
|
|
20
|
+
? ticks
|
|
21
|
+
.filter(tick => tick.type === 'major')
|
|
22
|
+
.map(tick => {
|
|
23
|
+
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("text", { x: x - 3, y: 7 + 11, fontSize: 11, fill: c, children: (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx) }, `label-${tick.base}`));
|
|
25
|
+
})
|
|
26
|
+
: null] }));
|
|
29
27
|
}
|
|
30
28
|
function SVGRuler({ model, fontSize, }) {
|
|
31
29
|
const { dynamicBlocks: { contentBlocks }, offsetPx: viewOffsetPx, bpPerPx, } = model;
|
|
32
30
|
const renderRuler = contentBlocks.length < 5;
|
|
33
31
|
const theme = (0, material_1.useTheme)();
|
|
34
32
|
const c = (0, util_1.stripAlpha)(theme.palette.text.primary);
|
|
35
|
-
return (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return (react_1.default.createElement("g", { key: key },
|
|
42
|
-
react_1.default.createElement("defs", null,
|
|
43
|
-
react_1.default.createElement("clipPath", { id: clipid },
|
|
44
|
-
react_1.default.createElement("rect", { x: 0, y: 0, width: widthPx, height: 100 }))),
|
|
45
|
-
react_1.default.createElement("g", { transform: `translate(${offset} 0)` },
|
|
46
|
-
react_1.default.createElement("g", { clipPath: `url(#${clipid})` },
|
|
47
|
-
react_1.default.createElement("text", { x: 4, y: fontSize, fontSize: fontSize, fill: c }, refName),
|
|
48
|
-
react_1.default.createElement("g", { transform: "translate(0 20)" },
|
|
49
|
-
react_1.default.createElement(Ruler, { hideText: !renderRuler, start: start, end: end, bpPerPx: bpPerPx, reversed: reversed }))))));
|
|
50
|
-
})));
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SVGRegionSeparators_1.default, { model: model, height: 30 }), contentBlocks.map(block => {
|
|
34
|
+
const { start, end, key, reversed, offsetPx, refName, widthPx } = block;
|
|
35
|
+
const offset = offsetPx - viewOffsetPx;
|
|
36
|
+
const clipid = `clip-${key}`;
|
|
37
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: clipid, children: (0, jsx_runtime_1.jsx)("rect", { x: 0, y: 0, width: widthPx, height: 100 }) }) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(${offset} 0)`, children: (0, jsx_runtime_1.jsxs)("g", { clipPath: `url(#${clipid})`, children: [(0, jsx_runtime_1.jsx)("text", { x: 4, y: fontSize, fontSize: fontSize, fill: c, children: refName }), (0, jsx_runtime_1.jsx)("g", { transform: "translate(0 20)", children: (0, jsx_runtime_1.jsx)(Ruler, { hideText: !renderRuler, start: start, end: end, bpPerPx: bpPerPx, reversed: reversed }) })] }) })] }, key));
|
|
38
|
+
})] }));
|
|
51
39
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
3
|
export default function SVGScalebar({ model, fontSize, }: {
|
|
5
4
|
model: LGV;
|
|
6
5
|
fontSize: number;
|
|
7
|
-
}):
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.default = SVGScalebar;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const util_1 = require("@jbrowse/core/util");
|
|
9
6
|
const material_1 = require("@mui/material");
|
|
10
7
|
function SVGScalebar({ model, fontSize, }) {
|
|
@@ -16,9 +13,5 @@ function SVGScalebar({ model, fontSize, }) {
|
|
|
16
13
|
const c = (0, util_1.stripAlpha)(theme.palette.text.secondary);
|
|
17
14
|
const x = x0 + (x1 - x0) / 2;
|
|
18
15
|
const y = fontSize;
|
|
19
|
-
return (
|
|
20
|
-
react_1.default.createElement("line", { x1: x0, x2: x1, y1: 10, y2: 10, stroke: c }),
|
|
21
|
-
react_1.default.createElement("line", { x1: x0, x2: x0, y1: 5, y2: 15, stroke: c }),
|
|
22
|
-
react_1.default.createElement("line", { x1: x1, x2: x1, y1: 5, y2: 15, stroke: c }),
|
|
23
|
-
react_1.default.createElement("text", { x: x, y: y, textAnchor: "middle", dominantBaseline: "hanging", fontSize: fontSize, fill: c }, displayBp)));
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("line", { x1: x0, x2: x1, y1: 10, y2: 10, stroke: c }), (0, jsx_runtime_1.jsx)("line", { x1: x0, x2: x0, y1: 5, y2: 15, stroke: c }), (0, jsx_runtime_1.jsx)("line", { x1: x1, x2: x1, y1: 5, y2: 15, stroke: c }), (0, jsx_runtime_1.jsx)("text", { x: x, y: y, textAnchor: "middle", dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: displayBp })] }));
|
|
24
17
|
}
|