@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
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
|
|
3
4
|
import { getSession, useLocalStorage } from '@jbrowse/core/util';
|
|
4
5
|
import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
|
|
5
6
|
function LoadingMessage() {
|
|
6
|
-
return (
|
|
7
|
-
React.createElement(CircularProgress, { size: 20, style: { marginRight: 20 } }),
|
|
8
|
-
React.createElement(Typography, { display: "inline" }, "Creating SVG")));
|
|
7
|
+
return (_jsxs("div", { children: [_jsx(CircularProgress, { size: 20, style: { marginRight: 20 } }), _jsx(Typography, { display: "inline", children: "Creating SVG" })] }));
|
|
9
8
|
}
|
|
10
9
|
function useSvgLocal(key, val) {
|
|
11
10
|
return useLocalStorage(`svg-${key}`, val);
|
|
12
11
|
}
|
|
13
12
|
function TextField2({ children, ...rest }) {
|
|
14
|
-
return (
|
|
15
|
-
React.createElement(TextField, { ...rest }, children)));
|
|
13
|
+
return (_jsx("div", { children: _jsx(TextField, { ...rest, children: children }) }));
|
|
16
14
|
}
|
|
17
15
|
export default function ExportSvgDialog({ model, handleClose, }) {
|
|
18
16
|
const session = getSession(model);
|
|
@@ -23,47 +21,34 @@ export default function ExportSvgDialog({ model, handleClose, }) {
|
|
|
23
21
|
const [filename, setFilename] = useSvgLocal('file', 'jbrowse.svg');
|
|
24
22
|
const [trackLabels, setTrackLabels] = useSvgLocal('tracklabels', 'offset');
|
|
25
23
|
const [themeName, setThemeName] = useSvgLocal('theme', session.themeName || 'default');
|
|
26
|
-
return (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
trackLabels,
|
|
57
|
-
themeName,
|
|
58
|
-
});
|
|
59
|
-
handleClose();
|
|
60
|
-
}
|
|
61
|
-
catch (e) {
|
|
62
|
-
console.error(e);
|
|
63
|
-
setError(e);
|
|
64
|
-
}
|
|
65
|
-
finally {
|
|
66
|
-
setLoading(false);
|
|
67
|
-
}
|
|
68
|
-
} }, "Submit"))));
|
|
24
|
+
return (_jsxs(Dialog, { open: true, onClose: handleClose, title: "Export SVG", children: [_jsxs(DialogContent, { children: [error ? (_jsx(ErrorMessage, { error: error })) : loading ? (_jsx(LoadingMessage, {})) : null, _jsx(TextField2, { helperText: "filename", value: filename, onChange: event => {
|
|
25
|
+
setFilename(event.target.value);
|
|
26
|
+
} }), _jsxs(TextField2, { select: true, label: "Track label positioning", variant: "outlined", style: { width: 150 }, value: trackLabels, onChange: event => {
|
|
27
|
+
setTrackLabels(event.target.value);
|
|
28
|
+
}, children: [_jsx(MenuItem, { value: "offset", children: "Offset" }), _jsx(MenuItem, { value: "overlay", children: "Overlay" }), _jsx(MenuItem, { value: "left", children: "Left" }), _jsx(MenuItem, { value: "none", children: "None" })] }), session.allThemes ? (_jsx(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
|
|
29
|
+
setThemeName(event.target.value);
|
|
30
|
+
}, children: Object.entries(session.allThemes()).map(([key, val]) => (_jsx(MenuItem, { value: key, children: val.name || '(Unknown name)' }, key))) })) : null, offscreenCanvas ? (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: rasterizeLayers, onChange: () => {
|
|
31
|
+
setRasterizeLayers(val => !val);
|
|
32
|
+
} }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (_jsx(Typography, { children: "Note: rasterizing layers not yet supported in this browser, so SVG size may be large" }))] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
33
|
+
handleClose();
|
|
34
|
+
}, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", type: "submit", onClick: async () => {
|
|
35
|
+
setLoading(true);
|
|
36
|
+
setError(undefined);
|
|
37
|
+
try {
|
|
38
|
+
await model.exportSvg({
|
|
39
|
+
rasterizeLayers,
|
|
40
|
+
filename,
|
|
41
|
+
trackLabels,
|
|
42
|
+
themeName,
|
|
43
|
+
});
|
|
44
|
+
handleClose();
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
console.error(e);
|
|
48
|
+
setError(e);
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
setLoading(false);
|
|
52
|
+
}
|
|
53
|
+
}, children: "Submit" })] })] }));
|
|
69
54
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
3
|
declare const GetSequenceDialog: ({ model, handleClose, }: {
|
|
5
4
|
model: LGV;
|
|
6
5
|
handleClose: () => void;
|
|
7
|
-
}) =>
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default GetSequenceDialog;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
2
3
|
import { getConf } from '@jbrowse/core/configuration';
|
|
3
4
|
import { Dialog } from '@jbrowse/core/ui';
|
|
4
5
|
import { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons';
|
|
@@ -96,45 +97,32 @@ const GetSequenceDialog = observer(function ({ model, handleClose, }) {
|
|
|
96
97
|
}))
|
|
97
98
|
: '';
|
|
98
99
|
const sequenceTooLarge = sequence ? sequence.length > 1000000 : false;
|
|
99
|
-
return (
|
|
100
|
+
return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: () => {
|
|
100
101
|
handleClose();
|
|
101
102
|
model.setOffsets();
|
|
102
|
-
}, title: "Reference sequence" },
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
React.createElement(Button, { onClick: () => {
|
|
127
|
-
copy(sequence);
|
|
128
|
-
setCopied(true);
|
|
129
|
-
setTimeout(() => {
|
|
130
|
-
setCopied(false);
|
|
131
|
-
}, 500);
|
|
132
|
-
}, disabled: loading || !!error || sequenceTooLarge, color: "primary", startIcon: React.createElement(ContentCopyIcon, null) }, copied ? 'Copied' : 'Copy to clipboard'),
|
|
133
|
-
React.createElement(Button, { onClick: () => {
|
|
134
|
-
saveAs(new Blob([sequence || ''], {
|
|
135
|
-
type: 'text/x-fasta;charset=utf-8',
|
|
136
|
-
}), 'jbrowse_ref_seq.fa');
|
|
137
|
-
}, disabled: loading || !!error, color: "primary", startIcon: React.createElement(GetAppIcon, null) }, "Download FASTA"),
|
|
138
|
-
React.createElement(Button, { onClick: handleClose, variant: "contained" }, "Close"))));
|
|
103
|
+
}, title: "Reference sequence", children: [_jsxs(DialogContent, { children: [error ? (_jsx(Typography, { color: "error", children: `${error}` })) : loading ? (_jsxs(Container, { children: ["Retrieving reference sequence...", _jsx(CircularProgress, { className: classes.ml, size: 20, disableShrink: true })] })) : null, _jsx(TextField, { "data-testid": "rubberband-sequence", variant: "outlined", multiline: true, minRows: 5, maxRows: 10, disabled: sequenceTooLarge, className: classes.dialogContent, fullWidth: true, value: sequenceTooLarge
|
|
104
|
+
? 'Reference sequence too large to display, use the download FASTA button'
|
|
105
|
+
: sequence, slotProps: {
|
|
106
|
+
input: {
|
|
107
|
+
readOnly: true,
|
|
108
|
+
classes: {
|
|
109
|
+
input: classes.textAreaFont,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
} }), _jsxs(FormGroup, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { value: rev, onChange: event => {
|
|
113
|
+
setReverse(event.target.checked);
|
|
114
|
+
} }), label: "Reverse sequence" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { value: comp, onChange: event => {
|
|
115
|
+
setComplement(event.target.checked);
|
|
116
|
+
} }), label: "Complement sequence" })] }), _jsx(Typography, { style: { margin: 10 }, children: "Note: Check both boxes for the \"reverse complement\"" })] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: () => {
|
|
117
|
+
copy(sequence);
|
|
118
|
+
setCopied(true);
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
setCopied(false);
|
|
121
|
+
}, 500);
|
|
122
|
+
}, disabled: loading || !!error || sequenceTooLarge, color: "primary", startIcon: _jsx(ContentCopyIcon, {}), children: copied ? 'Copied' : 'Copy to clipboard' }), _jsx(Button, { onClick: () => {
|
|
123
|
+
saveAs(new Blob([sequence || ''], {
|
|
124
|
+
type: 'text/x-fasta;charset=utf-8',
|
|
125
|
+
}), 'jbrowse_ref_seq.fa');
|
|
126
|
+
}, disabled: loading || !!error, color: "primary", startIcon: _jsx(GetAppIcon, {}), children: "Download FASTA" }), _jsx(Button, { onClick: handleClose, variant: "contained", children: "Close" })] })] }));
|
|
139
127
|
});
|
|
140
128
|
export default GetSequenceDialog;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
3
|
declare const Gridlines: ({ model }: {
|
|
5
4
|
model: LGV;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default Gridlines;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
3
|
import { makeStyles } from 'tss-react/mui';
|
|
4
4
|
import { ContentBlock as ContentBlockComponent, ElidedBlock as ElidedBlockComponent, InterRegionPaddingBlock as InterRegionPaddingBlockComponent, } from '../../BaseLinearDisplay/components/Block';
|
|
@@ -33,39 +33,37 @@ const useStyles = makeStyles()(theme => ({
|
|
|
33
33
|
function RenderedBlockLines({ block, bpPerPx, }) {
|
|
34
34
|
const { classes, cx } = useStyles();
|
|
35
35
|
const ticks = makeTicks(block.start, block.end, bpPerPx);
|
|
36
|
-
return (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
return (_jsx(ContentBlockComponent, { block: block, children: ticks.map(({ type, base }) => {
|
|
37
|
+
const x = (block.reversed ? block.end - base : base - block.start) / bpPerPx;
|
|
38
|
+
return (_jsx("div", { className: cx(classes.tick, type === 'major' || type === 'labeledMajor'
|
|
39
|
+
? classes.majorTick
|
|
40
|
+
: classes.minorTick), style: { left: x } }, base));
|
|
41
|
+
}) }));
|
|
42
42
|
}
|
|
43
43
|
const RenderedVerticalGuides = observer(({ model }) => {
|
|
44
44
|
const { staticBlocks, bpPerPx } = model;
|
|
45
|
-
return (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
return (_jsx(_Fragment, { children: staticBlocks.map((block, index) => {
|
|
46
|
+
const k = `${block.key}-${index}`;
|
|
47
|
+
if (block.type === 'ContentBlock') {
|
|
48
|
+
return _jsx(RenderedBlockLines, { block: block, bpPerPx: bpPerPx }, k);
|
|
49
|
+
}
|
|
50
|
+
else if (block.type === 'ElidedBlock') {
|
|
51
|
+
return _jsx(ElidedBlockComponent, { width: block.widthPx }, k);
|
|
52
|
+
}
|
|
53
|
+
else if (block.type === 'InterRegionPaddingBlock') {
|
|
54
|
+
return (_jsx(InterRegionPaddingBlockComponent, { width: block.widthPx, boundary: block.variant === 'boundary' }, k));
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
57
|
+
}) }));
|
|
58
58
|
});
|
|
59
59
|
const Gridlines = observer(function ({ model }) {
|
|
60
60
|
const { classes } = useStyles();
|
|
61
61
|
const offsetLeft = model.staticBlocks.offsetPx - model.offsetPx;
|
|
62
|
-
return (
|
|
62
|
+
return (_jsx("div", { className: classes.verticalGuidesZoomContainer, style: {
|
|
63
63
|
transform: model.scaleFactor !== 1 ? `scaleX(${model.scaleFactor})` : undefined,
|
|
64
|
-
}
|
|
65
|
-
React.createElement("div", { className: classes.verticalGuidesContainer, style: {
|
|
64
|
+
}, children: _jsx("div", { className: classes.verticalGuidesContainer, style: {
|
|
66
65
|
left: offsetLeft,
|
|
67
66
|
width: model.staticBlocks.totalWidthPx,
|
|
68
|
-
} }
|
|
69
|
-
React.createElement(RenderedVerticalGuides, { model: model }))));
|
|
67
|
+
}, children: _jsx(RenderedVerticalGuides, { model: model }) }) }));
|
|
70
68
|
});
|
|
71
69
|
export default Gridlines;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}) => React.JSX.Element | null;
|
|
2
|
+
declare const LinearGenomeViewHeader: ({ model, }: {
|
|
3
|
+
model: LinearGenomeViewModel;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
5
|
export default LinearGenomeViewHeader;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { getBpDisplayStr } from '@jbrowse/core/util';
|
|
4
|
-
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
5
|
-
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
|
6
|
-
import { Button, FormGroup, IconButton, Typography, alpha } from '@mui/material';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FormGroup } from '@mui/material';
|
|
7
3
|
import { observer } from 'mobx-react';
|
|
8
4
|
import { makeStyles } from 'tss-react/mui';
|
|
5
|
+
import HeaderPanControls from './HeaderPanControls';
|
|
6
|
+
import HeaderRegionWidth from './HeaderRegionWidth';
|
|
7
|
+
import HeaderTrackSelectorButton from './HeaderTrackSelectorButton';
|
|
8
|
+
import HeaderZoomControls from './HeaderZoomControls';
|
|
9
9
|
import OverviewScalebar from './OverviewScalebar';
|
|
10
10
|
import SearchBox from './SearchBox';
|
|
11
|
-
|
|
12
|
-
import { SPACING } from '../consts';
|
|
13
|
-
const useStyles = makeStyles()(theme => ({
|
|
11
|
+
const useStyles = makeStyles()({
|
|
14
12
|
headerBar: {
|
|
15
13
|
display: 'flex',
|
|
16
14
|
},
|
|
@@ -21,62 +19,13 @@ const useStyles = makeStyles()(theme => ({
|
|
|
21
19
|
spacer: {
|
|
22
20
|
flexGrow: 1,
|
|
23
21
|
},
|
|
24
|
-
panButton: {
|
|
25
|
-
background: alpha(theme.palette.background.paper, 0.8),
|
|
26
|
-
color: theme.palette.text.primary,
|
|
27
|
-
margin: SPACING,
|
|
28
|
-
},
|
|
29
|
-
bp: {
|
|
30
|
-
display: 'flex',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
marginLeft: 5,
|
|
33
|
-
},
|
|
34
|
-
toggleButton: {
|
|
35
|
-
height: 44,
|
|
36
|
-
border: 'none',
|
|
37
|
-
marginLeft: theme.spacing(4),
|
|
38
|
-
},
|
|
39
|
-
buttonSpacer: {
|
|
40
|
-
marginRight: theme.spacing(2),
|
|
41
|
-
},
|
|
42
|
-
}));
|
|
43
|
-
const HeaderButtons = observer(({ model }) => {
|
|
44
|
-
const { classes } = useStyles();
|
|
45
|
-
return (React.createElement(IconButton, { onClick: model.activateTrackSelector, className: classes.toggleButton, title: "Open track selector", value: "track_select" },
|
|
46
|
-
React.createElement(TrackSelectorIcon, { className: classes.buttonSpacer })));
|
|
47
|
-
});
|
|
48
|
-
function PanControls({ model }) {
|
|
49
|
-
const { classes } = useStyles();
|
|
50
|
-
return (React.createElement(React.Fragment, null,
|
|
51
|
-
React.createElement(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
|
|
52
|
-
model.slide(-0.9);
|
|
53
|
-
} },
|
|
54
|
-
React.createElement(ArrowBackIcon, null)),
|
|
55
|
-
React.createElement(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
|
|
56
|
-
model.slide(0.9);
|
|
57
|
-
} },
|
|
58
|
-
React.createElement(ArrowForwardIcon, null))));
|
|
59
|
-
}
|
|
60
|
-
const RegionWidth = observer(function ({ model }) {
|
|
61
|
-
const { classes } = useStyles();
|
|
62
|
-
const { coarseTotalBp } = model;
|
|
63
|
-
return (React.createElement(Typography, { variant: "body2", color: "textSecondary", className: classes.bp }, getBpDisplayStr(coarseTotalBp)));
|
|
64
22
|
});
|
|
65
|
-
const Controls = ({ model })
|
|
23
|
+
const Controls = function ({ model }) {
|
|
66
24
|
const { classes } = useStyles();
|
|
67
|
-
return (
|
|
68
|
-
React.createElement(HeaderButtons, { model: model }),
|
|
69
|
-
React.createElement("div", { className: classes.spacer }),
|
|
70
|
-
React.createElement(FormGroup, { row: true, className: classes.headerForm },
|
|
71
|
-
React.createElement(PanControls, { model: model }),
|
|
72
|
-
React.createElement(SearchBox, { model: model })),
|
|
73
|
-
React.createElement(RegionWidth, { model: model }),
|
|
74
|
-
React.createElement(ZoomControls, { model: model }),
|
|
75
|
-
React.createElement("div", { className: classes.spacer })));
|
|
25
|
+
return (_jsxs("div", { className: classes.headerBar, children: [_jsx(HeaderTrackSelectorButton, { model: model }), _jsx("div", { className: classes.spacer }), _jsxs(FormGroup, { row: true, className: classes.headerForm, children: [_jsx(HeaderPanControls, { model: model }), _jsx(SearchBox, { model: model })] }), _jsx(HeaderRegionWidth, { model: model }), _jsx(HeaderZoomControls, { model: model }), _jsx("div", { className: classes.spacer })] }));
|
|
76
26
|
};
|
|
77
|
-
const LinearGenomeViewHeader = observer(function ({ model }) {
|
|
27
|
+
const LinearGenomeViewHeader = observer(function ({ model, }) {
|
|
78
28
|
const { hideHeader, hideHeaderOverview } = model;
|
|
79
|
-
return !hideHeader ? (hideHeaderOverview ? (
|
|
80
|
-
React.createElement(Controls, { model: model })))) : null;
|
|
29
|
+
return !hideHeader ? (hideHeaderOverview ? (_jsx(Controls, { model: model })) : (_jsx(OverviewScalebar, { model: model, children: _jsx(Controls, { model: model }) }))) : null;
|
|
81
30
|
});
|
|
82
31
|
export default LinearGenomeViewHeader;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
3
|
+
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
|
4
|
+
import { Button, alpha } from '@mui/material';
|
|
5
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
|
+
import { SPACING } from '../consts';
|
|
7
|
+
const useStyles = makeStyles()(theme => ({
|
|
8
|
+
panButton: {
|
|
9
|
+
background: alpha(theme.palette.background.paper, 0.8),
|
|
10
|
+
color: theme.palette.text.primary,
|
|
11
|
+
margin: SPACING,
|
|
12
|
+
},
|
|
13
|
+
buttonSpacer: {
|
|
14
|
+
marginRight: theme.spacing(2),
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
export default function HeaderPanControls({ model }) {
|
|
18
|
+
const { classes } = useStyles();
|
|
19
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
|
|
20
|
+
model.slide(-0.9);
|
|
21
|
+
}, children: _jsx(ArrowBackIcon, {}) }), _jsx(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
|
|
22
|
+
model.slide(0.9);
|
|
23
|
+
}, children: _jsx(ArrowForwardIcon, {}) })] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getBpDisplayStr } from '@jbrowse/core/util';
|
|
3
|
+
import { Typography } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
|
+
const useStyles = makeStyles()({
|
|
7
|
+
bp: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
marginLeft: 5,
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const HeaderRegionWidth = observer(function ({ model, }) {
|
|
15
|
+
const { classes } = useStyles();
|
|
16
|
+
const { coarseTotalBp } = model;
|
|
17
|
+
return (_jsx(Typography, { variant: "body2", color: "textSecondary", className: classes.bp, children: getBpDisplayStr(coarseTotalBp) }));
|
|
18
|
+
});
|
|
19
|
+
export default HeaderRegionWidth;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
3
|
+
import { IconButton } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
|
+
const useStyles = makeStyles()(theme => ({
|
|
7
|
+
toggleButton: {
|
|
8
|
+
height: 44,
|
|
9
|
+
border: 'none',
|
|
10
|
+
marginLeft: theme.spacing(4),
|
|
11
|
+
},
|
|
12
|
+
}));
|
|
13
|
+
const HeaderTrackSelectorButton = observer(function ({ model, }) {
|
|
14
|
+
const { classes } = useStyles();
|
|
15
|
+
return (_jsx(IconButton, { onClick: model.activateTrackSelector, className: classes.toggleButton, title: "Open track selector", value: "track_select", children: _jsx(TrackSelectorIcon, {}) }));
|
|
16
|
+
});
|
|
17
|
+
export default HeaderTrackSelectorButton;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { lazy, useEffect, useState } from 'react';
|
|
3
|
+
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
5
|
+
import MoreVert from '@mui/icons-material/MoreVert';
|
|
6
|
+
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
7
|
+
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
8
|
+
import { IconButton, Slider, Tooltip } from '@mui/material';
|
|
9
|
+
import { observer } from 'mobx-react';
|
|
10
|
+
import { makeStyles } from 'tss-react/mui';
|
|
11
|
+
const RegionWidthEditorDialog = lazy(() => import('./RegionWidthEditorDialog'));
|
|
12
|
+
const useStyles = makeStyles()(theme => ({
|
|
13
|
+
container: {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
},
|
|
18
|
+
slider: {
|
|
19
|
+
width: 100,
|
|
20
|
+
color: theme.palette.text.secondary,
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
23
|
+
const HeaderZoomControls = observer(function ({ model, }) {
|
|
24
|
+
const { classes } = useStyles();
|
|
25
|
+
const { maxBpPerPx, minBpPerPx, bpPerPx } = model;
|
|
26
|
+
const [value, setValue] = useState(-Math.log2(bpPerPx) * 100);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setValue(-Math.log2(bpPerPx) * 100);
|
|
29
|
+
}, [bpPerPx]);
|
|
30
|
+
const zoomInDisabled = bpPerPx <= minBpPerPx + 0.0001;
|
|
31
|
+
const zoomOutDisabled = bpPerPx >= maxBpPerPx - 0.0001;
|
|
32
|
+
return (_jsxs("div", { className: classes.container, children: [_jsx(Tooltip, { title: "Zoom out 2x", children: _jsx("span", { children: _jsx(IconButton, { "data-testid": "zoom_out", disabled: zoomOutDisabled, onClick: () => {
|
|
33
|
+
model.zoom(bpPerPx * 2);
|
|
34
|
+
}, children: _jsx(ZoomOut, {}) }) }) }), _jsx(Slider, { size: "small", className: classes.slider, value: value, min: -Math.log2(maxBpPerPx) * 100, max: -Math.log2(minBpPerPx) * 100, onChangeCommitted: () => model.zoomTo(2 ** (-value / 100)), onChange: (_, val) => {
|
|
35
|
+
setValue(val);
|
|
36
|
+
} }), _jsx(Tooltip, { title: "Zoom in 2x", children: _jsx("span", { children: _jsx(IconButton, { "data-testid": "zoom_in", disabled: zoomInDisabled, onClick: () => {
|
|
37
|
+
model.zoom(model.bpPerPx / 2);
|
|
38
|
+
}, children: _jsx(ZoomIn, {}) }) }) }), _jsx(CascadingMenuButton, { menuItems: [
|
|
39
|
+
...[100, 50, 10].map(r => ({
|
|
40
|
+
label: `Zoom in ${r}x`,
|
|
41
|
+
onClick: () => {
|
|
42
|
+
model.zoom(model.bpPerPx / r);
|
|
43
|
+
},
|
|
44
|
+
})),
|
|
45
|
+
...[10, 50, 100].map(r => ({
|
|
46
|
+
label: `Zoom out ${r}x`,
|
|
47
|
+
onClick: () => {
|
|
48
|
+
model.zoom(model.bpPerPx * r);
|
|
49
|
+
},
|
|
50
|
+
})),
|
|
51
|
+
{
|
|
52
|
+
label: 'Custom zoom',
|
|
53
|
+
onClick: () => {
|
|
54
|
+
getSession(model).queueDialog(handleClose => [
|
|
55
|
+
RegionWidthEditorDialog,
|
|
56
|
+
{
|
|
57
|
+
model,
|
|
58
|
+
handleClose,
|
|
59
|
+
},
|
|
60
|
+
]);
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
], children: _jsx(MoreVert, {}) })] }));
|
|
64
|
+
});
|
|
65
|
+
export default HeaderZoomControls;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '../model';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
|
-
declare const
|
|
3
|
+
declare const Highlight: ({ model, highlight, }: {
|
|
5
4
|
model: LGV;
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
highlight: {
|
|
6
|
+
assemblyName: string;
|
|
7
|
+
refName: string;
|
|
8
|
+
start: number;
|
|
9
|
+
end: number;
|
|
10
|
+
};
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export default Highlight;
|