@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,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { stringify } from '@jbrowse/core/util';
|
|
3
3
|
import { Tooltip } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
@@ -14,10 +14,9 @@ const useStyles = makeStyles()({
|
|
|
14
14
|
});
|
|
15
15
|
const VerticalGuide = observer(function VerticalGuide({ model, coordX, }) {
|
|
16
16
|
const { classes } = useStyles();
|
|
17
|
-
return (
|
|
18
|
-
React.createElement("div", { className: classes.guide, style: {
|
|
17
|
+
return (_jsx(Tooltip, { open: true, placement: "top", title: stringify(model.pxToBp(coordX)), arrow: true, children: _jsx("div", { className: classes.guide, style: {
|
|
19
18
|
left: coordX,
|
|
20
19
|
background: 'red',
|
|
21
|
-
} })));
|
|
20
|
+
} }) }));
|
|
22
21
|
});
|
|
23
22
|
export 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;
|
|
@@ -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';
|
|
@@ -2,7 +2,7 @@ import { lazy } from 'react';
|
|
|
2
2
|
import { getConf } from '@jbrowse/core/configuration';
|
|
3
3
|
import { BaseViewModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
4
4
|
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
5
|
-
import { assembleLocString, clamp, findLast, getSession, isSessionModelWithWidgets, isSessionWithAddTracks, localStorageGetItem, localStorageSetItem, measureText, springAnimate, sum, } from '@jbrowse/core/util';
|
|
5
|
+
import { assembleLocString, clamp, findLast, getSession, isSessionModelWithWidgets, isSessionWithAddTracks, localStorageGetBoolean, localStorageGetItem, localStorageSetItem, measureText, springAnimate, sum, } from '@jbrowse/core/util';
|
|
6
6
|
import { bpToPx, moveTo, pxToBp } from '@jbrowse/core/util/Base1DUtils';
|
|
7
7
|
import Base1DView from '@jbrowse/core/util/Base1DViewModel';
|
|
8
8
|
import calculateDynamicBlocks from '@jbrowse/core/util/calculateDynamicBlocks';
|
|
@@ -22,7 +22,7 @@ import { saveAs } from 'file-saver';
|
|
|
22
22
|
import { autorun, transaction, when } from 'mobx';
|
|
23
23
|
import { addDisposer, cast, getParent, getRoot, getSnapshot, resolveIdentifier, types, } from 'mobx-state-tree';
|
|
24
24
|
import Header from './components/Header';
|
|
25
|
-
import { generateLocations, parseLocStrings } from './util';
|
|
25
|
+
import { calculateVisibleLocStrings, generateLocations, parseLocStrings, } from './util';
|
|
26
26
|
import { handleSelectedRegion } from '../searchUtils';
|
|
27
27
|
import MiniControls from './components/MiniControls';
|
|
28
28
|
import { HEADER_BAR_HEIGHT, HEADER_OVERVIEW_HEIGHT, INTER_REGION_PADDING_WIDTH, RESIZE_HANDLE_HEIGHT, SCALE_BAR_HEIGHT, } from './consts';
|
|
@@ -31,19 +31,6 @@ const SequenceSearchDialog = lazy(() => import('./components/SequenceSearchDialo
|
|
|
31
31
|
const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'));
|
|
32
32
|
const GetSequenceDialog = lazy(() => import('./components/GetSequenceDialog'));
|
|
33
33
|
const SearchResultsDialog = lazy(() => import('./components/SearchResultsDialog'));
|
|
34
|
-
function calculateVisibleLocStrings(contentBlocks) {
|
|
35
|
-
if (!contentBlocks.length) {
|
|
36
|
-
return '';
|
|
37
|
-
}
|
|
38
|
-
const isSingleAssemblyName = contentBlocks.every(b => b.assemblyName === contentBlocks[0].assemblyName);
|
|
39
|
-
const locs = contentBlocks.map(block => assembleLocString({
|
|
40
|
-
...block,
|
|
41
|
-
start: Math.round(block.start),
|
|
42
|
-
end: Math.round(block.end),
|
|
43
|
-
assemblyName: isSingleAssemblyName ? undefined : block.assemblyName,
|
|
44
|
-
}));
|
|
45
|
-
return locs.join(' ');
|
|
46
|
-
}
|
|
47
34
|
export function stateModelFactory(pluginManager) {
|
|
48
35
|
return types
|
|
49
36
|
.compose('LinearGenomeView', BaseViewModel, types.model({
|
|
@@ -57,13 +44,13 @@ export function stateModelFactory(pluginManager) {
|
|
|
57
44
|
hideHeaderOverview: false,
|
|
58
45
|
hideNoTracksActive: false,
|
|
59
46
|
trackSelectorType: types.optional(types.enumeration(['hierarchical']), 'hierarchical'),
|
|
60
|
-
showCenterLine: types.optional(types.boolean, () =>
|
|
61
|
-
showCytobandsSetting: types.optional(types.boolean, () =>
|
|
47
|
+
showCenterLine: types.optional(types.boolean, () => localStorageGetBoolean('lgv-showCenterLine', false)),
|
|
48
|
+
showCytobandsSetting: types.optional(types.boolean, () => localStorageGetBoolean('lgv-showCytobands', true)),
|
|
62
49
|
trackLabels: types.optional(types.string, () => localStorageGetItem('lgv-trackLabels') || ''),
|
|
63
50
|
showGridlines: true,
|
|
64
51
|
highlight: types.optional(types.array(types.frozen()), []),
|
|
65
|
-
colorByCDS: types.optional(types.boolean, () =>
|
|
66
|
-
showTrackOutlines: types.optional(types.boolean, () =>
|
|
52
|
+
colorByCDS: types.optional(types.boolean, () => localStorageGetBoolean('lgv-colorByCDS', false)),
|
|
53
|
+
showTrackOutlines: types.optional(types.boolean, () => localStorageGetBoolean('lgv-showTrackOutlines', true)),
|
|
67
54
|
}))
|
|
68
55
|
.volatile(() => ({
|
|
69
56
|
volatileWidth: undefined,
|
|
@@ -145,10 +132,12 @@ export function stateModelFactory(pluginManager) {
|
|
|
145
132
|
if (self.hideHeader) {
|
|
146
133
|
return 0;
|
|
147
134
|
}
|
|
148
|
-
if (self.hideHeaderOverview) {
|
|
135
|
+
else if (self.hideHeaderOverview) {
|
|
149
136
|
return HEADER_BAR_HEIGHT;
|
|
150
137
|
}
|
|
151
|
-
|
|
138
|
+
else {
|
|
139
|
+
return HEADER_BAR_HEIGHT + HEADER_OVERVIEW_HEIGHT;
|
|
140
|
+
}
|
|
152
141
|
},
|
|
153
142
|
get trackHeights() {
|
|
154
143
|
return sum(self.tracks.map(t => t.displays[0].height));
|
|
@@ -965,5 +954,4 @@ export function stateModelFactory(pluginManager) {
|
|
|
965
954
|
export { default as LinearGenomeView, default as ReactComponent, } from './components/LinearGenomeView';
|
|
966
955
|
export { default as RefNameAutocomplete } from './components/RefNameAutocomplete';
|
|
967
956
|
export { default as SearchBox } from './components/SearchBox';
|
|
968
|
-
export { default as ZoomControls } from './components/ZoomControls';
|
|
969
957
|
export { renderToSvg } from './svgcomponents/SVGLinearGenomeView';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { stripAlpha } from '@jbrowse/core/util';
|
|
3
3
|
import { useTheme } from '@mui/material';
|
|
4
4
|
export default function SVGBackground({ width, height, shift, }) {
|
|
5
5
|
const theme = useTheme();
|
|
6
|
-
return (
|
|
6
|
+
return (_jsx("rect", { width: width + shift * 2, height: height, fill: stripAlpha(theme.palette.background.default) }));
|
|
7
7
|
}
|
|
@@ -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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getSession, stripAlpha } from '@jbrowse/core/util';
|
|
3
3
|
import Base1DView from '@jbrowse/core/util/Base1DViewModel';
|
|
4
4
|
import { useTheme } from '@mui/material';
|
|
@@ -37,15 +37,5 @@ export default function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight
|
|
|
37
37
|
coord: last.reversed ? last.start : last.end,
|
|
38
38
|
}) || 0;
|
|
39
39
|
const y = +showCytobands * cytobandHeight;
|
|
40
|
-
return (
|
|
41
|
-
React.createElement("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c }, assemblyName),
|
|
42
|
-
showCytobands ? (React.createElement("g", { transform: `translate(0 ${rulerHeight})` },
|
|
43
|
-
React.createElement(Cytobands, { overview: overview, assembly: assembly, block: block }),
|
|
44
|
-
React.createElement("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }),
|
|
45
|
-
React.createElement("g", { transform: `translate(0,${HEADER_OVERVIEW_HEIGHT})` },
|
|
46
|
-
React.createElement(OverviewScalebarPolygon, { overview: overview, model: model, useOffset: false })))) : null,
|
|
47
|
-
React.createElement("g", { transform: `translate(0 ${fontSize + y})` },
|
|
48
|
-
React.createElement(SVGScalebar, { model: model, fontSize: fontSize })),
|
|
49
|
-
React.createElement("g", { transform: `translate(0 ${rulerHeight + y})` },
|
|
50
|
-
React.createElement(SVGRuler, { model: model, fontSize: fontSize }))));
|
|
40
|
+
return (_jsxs("g", { id: "header", children: [_jsx("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: assemblyName }), showCytobands ? (_jsxs("g", { transform: `translate(0 ${rulerHeight})`, children: [_jsx(Cytobands, { overview: overview, assembly: assembly, block: block }), _jsx("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }), _jsx("g", { transform: `translate(0,${HEADER_OVERVIEW_HEIGHT})`, children: _jsx(OverviewScalebarPolygon, { overview: overview, model: model, useOffset: false }) })] })) : null, _jsx("g", { transform: `translate(0 ${fontSize + y})`, children: _jsx(SVGScalebar, { model: model, fontSize: fontSize }) }), _jsx("g", { transform: `translate(0 ${rulerHeight + y})`, children: _jsx(SVGRuler, { model: model, fontSize: fontSize }) })] }));
|
|
51
41
|
}
|
|
@@ -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';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createJBrowseTheme } from '@jbrowse/core/ui';
|
|
3
3
|
import { getSession, max, measureText, renderToStaticMarkup, } from '@jbrowse/core/util';
|
|
4
4
|
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
5
5
|
import { ThemeProvider } from '@mui/material';
|
|
6
6
|
import { when } from 'mobx';
|
|
7
|
-
import { getRoot } from 'mobx-state-tree';
|
|
8
7
|
import SVGBackground from './SVGBackground';
|
|
9
8
|
import SVGHeader from './SVGHeader';
|
|
10
9
|
import SVGTracks from './SVGTracks';
|
|
@@ -14,7 +13,6 @@ export async function renderToSvg(model, opts) {
|
|
|
14
13
|
const { textHeight = 18, headerHeight = 40, rulerHeight = 50, fontSize = 13, cytobandHeight = 100, trackLabels = 'offset', themeName = 'default', Wrapper = ({ children }) => children, } = opts;
|
|
15
14
|
const session = getSession(model);
|
|
16
15
|
const { allThemes } = session;
|
|
17
|
-
const { createRootFn } = getRoot(model);
|
|
18
16
|
const theme = allThemes === null || allThemes === void 0 ? void 0 : allThemes()[themeName];
|
|
19
17
|
const { width, tracks, showCytobands } = model;
|
|
20
18
|
const shift = 50;
|
|
@@ -29,15 +27,7 @@ export async function renderToSvg(model, opts) {
|
|
|
29
27
|
const trackLabelMaxLen = max(tracks.map(t => measureText(getTrackName(t.configuration, session), fontSize)), 0) + 40;
|
|
30
28
|
const trackLabelOffset = trackLabels === 'left' ? trackLabelMaxLen : 0;
|
|
31
29
|
const w = width + trackLabelOffset;
|
|
32
|
-
return renderToStaticMarkup(
|
|
33
|
-
React.createElement(Wrapper, null,
|
|
34
|
-
React.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() },
|
|
35
|
-
React.createElement(SVGBackground, { width: w, height: height, shift: shift }),
|
|
36
|
-
React.createElement("g", { transform: `translate(${shift} 0)` },
|
|
37
|
-
React.createElement("g", { transform: `translate(${trackLabelOffset})` },
|
|
38
|
-
React.createElement(SVGHeader, { model: model, fontSize: fontSize, rulerHeight: rulerHeight, cytobandHeight: cytobandHeight })),
|
|
39
|
-
React.createElement("g", { transform: `translate(0 ${offset})` },
|
|
40
|
-
React.createElement(SVGTracks, { textHeight: textHeight, fontSize: fontSize, model: model, displayResults: displayResults, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset })))))), createRootFn);
|
|
30
|
+
return renderToStaticMarkup(_jsx(ThemeProvider, { theme: createJBrowseTheme(theme), children: _jsx(Wrapper, { children: _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: [_jsx(SVGBackground, { width: w, height: height, shift: shift }), _jsxs("g", { transform: `translate(${shift} 0)`, children: [_jsx("g", { transform: `translate(${trackLabelOffset})`, children: _jsx(SVGHeader, { model: model, fontSize: fontSize, rulerHeight: rulerHeight, cytobandHeight: cytobandHeight }) }), _jsx("g", { transform: `translate(0 ${offset})`, children: _jsx(SVGTracks, { textHeight: textHeight, fontSize: fontSize, model: model, displayResults: displayResults, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset }) })] })] }) }) }));
|
|
41
31
|
}
|
|
42
32
|
export { default as SVGRuler } from './SVGRuler';
|
|
43
33
|
export { default as SVGTracks } from './SVGTracks';
|
|
@@ -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,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
export default function SVGRegionSeparators({ model, height, }) {
|
|
3
3
|
const { dynamicBlocks, offsetPx, interRegionPaddingWidth } = model;
|
|
4
|
-
return (
|
|
4
|
+
return (_jsx(_Fragment, { children: dynamicBlocks.contentBlocks.slice(1).map(block => (_jsx("rect", { x: block.offsetPx - offsetPx - interRegionPaddingWidth, width: interRegionPaddingWidth, y: 0, height: height, fill: "grey" }, block.key))) }));
|
|
5
5
|
}
|
|
@@ -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 {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTickDisplayStr, stripAlpha } from '@jbrowse/core/util';
|
|
3
3
|
import { useTheme } from '@mui/material';
|
|
4
4
|
import { makeTicks } from '../util';
|
|
@@ -7,39 +7,27 @@ function Ruler({ start, end, bpPerPx, reversed = false, major = true, minor = tr
|
|
|
7
7
|
const ticks = makeTicks(start, end, bpPerPx, major, minor);
|
|
8
8
|
const theme = useTheme();
|
|
9
9
|
const c = stripAlpha(theme.palette.text.secondary);
|
|
10
|
-
return (
|
|
11
|
-
ticks.map(tick => {
|
|
12
|
-
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
13
|
-
return (React.createElement("line", { key: `tick-${tick.base}`, x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: c }));
|
|
14
|
-
}),
|
|
15
|
-
!hideText
|
|
16
|
-
? ticks
|
|
17
|
-
.filter(tick => tick.type === 'major')
|
|
18
|
-
.map(tick => {
|
|
10
|
+
return (_jsxs(_Fragment, { children: [ticks.map(tick => {
|
|
19
11
|
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
20
|
-
return (
|
|
21
|
-
})
|
|
22
|
-
|
|
12
|
+
return (_jsx("line", { x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: c }, `tick-${tick.base}`));
|
|
13
|
+
}), !hideText
|
|
14
|
+
? ticks
|
|
15
|
+
.filter(tick => tick.type === 'major')
|
|
16
|
+
.map(tick => {
|
|
17
|
+
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
18
|
+
return (_jsx("text", { x: x - 3, y: 7 + 11, fontSize: 11, fill: c, children: getTickDisplayStr(tick.base + 1, bpPerPx) }, `label-${tick.base}`));
|
|
19
|
+
})
|
|
20
|
+
: null] }));
|
|
23
21
|
}
|
|
24
22
|
export default function SVGRuler({ model, fontSize, }) {
|
|
25
23
|
const { dynamicBlocks: { contentBlocks }, offsetPx: viewOffsetPx, bpPerPx, } = model;
|
|
26
24
|
const renderRuler = contentBlocks.length < 5;
|
|
27
25
|
const theme = useTheme();
|
|
28
26
|
const c = stripAlpha(theme.palette.text.primary);
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return (React.createElement("g", { key: key },
|
|
36
|
-
React.createElement("defs", null,
|
|
37
|
-
React.createElement("clipPath", { id: clipid },
|
|
38
|
-
React.createElement("rect", { x: 0, y: 0, width: widthPx, height: 100 }))),
|
|
39
|
-
React.createElement("g", { transform: `translate(${offset} 0)` },
|
|
40
|
-
React.createElement("g", { clipPath: `url(#${clipid})` },
|
|
41
|
-
React.createElement("text", { x: 4, y: fontSize, fontSize: fontSize, fill: c }, refName),
|
|
42
|
-
React.createElement("g", { transform: "translate(0 20)" },
|
|
43
|
-
React.createElement(Ruler, { hideText: !renderRuler, start: start, end: end, bpPerPx: bpPerPx, reversed: reversed }))))));
|
|
44
|
-
})));
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsx(SVGRegionSeparators, { model: model, height: 30 }), contentBlocks.map(block => {
|
|
28
|
+
const { start, end, key, reversed, offsetPx, refName, widthPx } = block;
|
|
29
|
+
const offset = offsetPx - viewOffsetPx;
|
|
30
|
+
const clipid = `clip-${key}`;
|
|
31
|
+
return (_jsxs("g", { children: [_jsx("defs", { children: _jsx("clipPath", { id: clipid, children: _jsx("rect", { x: 0, y: 0, width: widthPx, height: 100 }) }) }), _jsx("g", { transform: `translate(${offset} 0)`, children: _jsxs("g", { clipPath: `url(#${clipid})`, children: [_jsx("text", { x: 4, y: fontSize, fontSize: fontSize, fill: c, children: refName }), _jsx("g", { transform: "translate(0 20)", children: _jsx(Ruler, { hideText: !renderRuler, start: start, end: end, bpPerPx: bpPerPx, reversed: reversed }) })] }) })] }, key));
|
|
32
|
+
})] }));
|
|
45
33
|
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getBpDisplayStr, stripAlpha } from '@jbrowse/core/util';
|
|
3
3
|
import { useTheme } from '@mui/material';
|
|
4
4
|
export default function SVGScalebar({ model, fontSize, }) {
|
|
@@ -10,9 +10,5 @@ export default function SVGScalebar({ model, fontSize, }) {
|
|
|
10
10
|
const c = stripAlpha(theme.palette.text.secondary);
|
|
11
11
|
const x = x0 + (x1 - x0) / 2;
|
|
12
12
|
const y = fontSize;
|
|
13
|
-
return (
|
|
14
|
-
React.createElement("line", { x1: x0, x2: x1, y1: 10, y2: 10, stroke: c }),
|
|
15
|
-
React.createElement("line", { x1: x0, x2: x0, y1: 5, y2: 15, stroke: c }),
|
|
16
|
-
React.createElement("line", { x1: x1, x2: x1, y1: 5, y2: 15, stroke: c }),
|
|
17
|
-
React.createElement("text", { x: x, y: y, textAnchor: "middle", dominantBaseline: "hanging", fontSize: fontSize, fill: c }, displayBp)));
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx("line", { x1: x0, x2: x1, y1: 10, y2: 10, stroke: c }), _jsx("line", { x1: x0, x2: x0, y1: 5, y2: 15, stroke: c }), _jsx("line", { x1: x1, x2: x1, y1: 5, y2: 15, stroke: c }), _jsx("text", { x: x, y: y, textAnchor: "middle", dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: displayBp })] }));
|
|
18
14
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export default function SVGTrackLabel({ trackLabels, trackName, fontSize, trackLabelOffset, x, }: {
|
|
3
2
|
trackName: string;
|
|
4
3
|
trackLabels: string;
|
|
5
4
|
fontSize: number;
|
|
6
5
|
trackLabelOffset: number;
|
|
7
6
|
x: number;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { coarseStripHTML, stripAlpha } from '@jbrowse/core/util';
|
|
3
3
|
import { useTheme } from '@mui/material';
|
|
4
4
|
export default function SVGTrackLabel({ trackLabels, trackName, fontSize, trackLabelOffset, x, }) {
|
|
@@ -7,5 +7,5 @@ export default function SVGTrackLabel({ trackLabels, trackName, fontSize, trackL
|
|
|
7
7
|
const xoff = trackLabels === 'overlay' ? 5 : 0;
|
|
8
8
|
const yoff = trackLabels === 'offset' ? 5 : 0;
|
|
9
9
|
const name = coarseStripHTML(trackName);
|
|
10
|
-
return trackLabels !== 'none' ? (
|
|
10
|
+
return trackLabels !== 'none' ? (_jsx("g", { children: trackLabels === 'left' ? (_jsx("text", { x: trackLabelOffset - 40, y: 20, fill: fill, fontSize: fontSize, dominantBaseline: "hanging", textAnchor: "end", children: name })) : (_jsx("text", { x: x + xoff, y: yoff, fill: fill, fontSize: fontSize, dominantBaseline: "hanging", children: name })) })) : null;
|
|
11
11
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '..';
|
|
3
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
3
|
type LGV = LinearGenomeViewModel;
|
|
@@ -18,5 +17,5 @@ export default function SVGTracks({ displayResults, model, textHeight, fontSize,
|
|
|
18
17
|
fontSize: number;
|
|
19
18
|
trackLabels?: string;
|
|
20
19
|
trackLabelOffset?: number;
|
|
21
|
-
}):
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
4
4
|
import SVGRegionSeparators from './SVGRegionSeparators';
|
|
@@ -6,18 +6,21 @@ import SVGTrackLabel from './SVGTrackLabel';
|
|
|
6
6
|
export default function SVGTracks({ displayResults, model, textHeight, fontSize, trackLabels = 'offset', trackLabelOffset = 0, }) {
|
|
7
7
|
const session = getSession(model);
|
|
8
8
|
const textOffset = trackLabels === 'offset' ? textHeight : 0;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
return (_jsx(_Fragment, { children: displayResults.reduce(({ prevOffset, reactElements }, { track, result }) => {
|
|
10
|
+
const conf = track.configuration;
|
|
11
|
+
const trackName = getTrackName(conf, session);
|
|
12
|
+
const display = track.displays[0];
|
|
13
|
+
const x = Math.max(-model.offsetPx, 0);
|
|
14
|
+
const currOffset = prevOffset + display.height + textOffset;
|
|
15
|
+
return {
|
|
16
|
+
prevOffset: currOffset,
|
|
17
|
+
reactElements: [
|
|
18
|
+
...reactElements,
|
|
19
|
+
_jsxs("g", { transform: `translate(0 ${prevOffset})`, children: [_jsxs("g", { transform: `translate(${trackLabelOffset} ${textOffset})`, children: [_jsx(SVGRegionSeparators, { model: model, height: display.height }), result] }), _jsx(SVGTrackLabel, { trackName: trackName, fontSize: fontSize, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset, x: x })] }, conf.trackId),
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
prevOffset: 0,
|
|
24
|
+
reactElements: [],
|
|
25
|
+
}).reactElements }));
|
|
23
26
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface BpOffset {
|
|
2
|
+
refName?: string;
|
|
3
|
+
index: number;
|
|
4
|
+
offset: number;
|
|
5
|
+
start?: number;
|
|
6
|
+
end?: number;
|
|
7
|
+
coord?: number;
|
|
8
|
+
reversed?: boolean;
|
|
9
|
+
assemblyName?: string;
|
|
10
|
+
oob?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ExportSvgOptions {
|
|
13
|
+
rasterizeLayers?: boolean;
|
|
14
|
+
filename?: string;
|
|
15
|
+
Wrapper?: React.FC<{
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
fontSize?: number;
|
|
19
|
+
rulerHeight?: number;
|
|
20
|
+
textHeight?: number;
|
|
21
|
+
paddingHeight?: number;
|
|
22
|
+
headerHeight?: number;
|
|
23
|
+
cytobandHeight?: number;
|
|
24
|
+
trackLabels?: string;
|
|
25
|
+
themeName?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface HighlightType {
|
|
28
|
+
start: number;
|
|
29
|
+
end: number;
|
|
30
|
+
assemblyName: string;
|
|
31
|
+
refName: string;
|
|
32
|
+
}
|
|
33
|
+
export interface NavLocation {
|
|
34
|
+
refName: string;
|
|
35
|
+
start?: number;
|
|
36
|
+
end?: number;
|
|
37
|
+
assemblyName?: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AssemblyManager, ParsedLocString } from '@jbrowse/core/util';
|
|
2
|
+
import type { BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
2
3
|
export declare function chooseGridPitch(scale: number, minMajorPitchPx: number, minMinorPitchPx: number): {
|
|
3
4
|
majorPitch: number;
|
|
4
5
|
minorPitch: number;
|
|
@@ -12,8 +13,9 @@ export declare function generateLocations(regions: ParsedLocString[], assemblyMa
|
|
|
12
13
|
assemblyName: string;
|
|
13
14
|
parentRegion: import("@jbrowse/core/assemblyManager/assembly").BasicRegion;
|
|
14
15
|
end?: number | undefined;
|
|
15
|
-
reversed?: boolean | undefined;
|
|
16
16
|
start?: number | undefined;
|
|
17
17
|
refName: string;
|
|
18
|
+
reversed?: boolean | undefined;
|
|
18
19
|
}[]>;
|
|
19
20
|
export declare function parseLocStrings(input: string, assemblyName: string, isValidRefName: (str: string, assemblyName: string) => boolean): ParsedLocString[];
|
|
21
|
+
export declare function calculateVisibleLocStrings(contentBlocks: BaseBlock[]): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseLocString } from '@jbrowse/core/util';
|
|
1
|
+
import { assembleLocString, parseLocString } from '@jbrowse/core/util';
|
|
2
2
|
export function chooseGridPitch(scale, minMajorPitchPx, minMinorPitchPx) {
|
|
3
3
|
scale = Math.abs(scale);
|
|
4
4
|
const minMajorPitchBp = minMajorPitchPx * scale;
|
|
@@ -100,3 +100,18 @@ export function parseLocStrings(input, assemblyName, isValidRefName) {
|
|
|
100
100
|
throw e;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
export function calculateVisibleLocStrings(contentBlocks) {
|
|
104
|
+
if (!contentBlocks.length) {
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const isSingleAssemblyName = contentBlocks.every(b => b.assemblyName === contentBlocks[0].assemblyName);
|
|
109
|
+
const locs = contentBlocks.map(block => assembleLocString({
|
|
110
|
+
...block,
|
|
111
|
+
start: Math.round(block.start),
|
|
112
|
+
end: Math.round(block.end),
|
|
113
|
+
assemblyName: isSingleAssemblyName ? undefined : block.assemblyName,
|
|
114
|
+
}));
|
|
115
|
+
return locs.join(' ');
|
|
116
|
+
}
|
|
117
|
+
}
|