@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/FeatureTrack/configSchema.d.ts +202 -71
- package/esm/FeatureTrack/configSchema.js +47 -1
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
- package/esm/LaunchLinearGenomeView/index.js +6 -12
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +265 -120
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +20 -9
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.js +142 -0
- package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
- package/esm/LinearGenomeView/components/Cytobands.js +76 -53
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +8 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +15 -67
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
- package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
- package/esm/LinearGenomeView/components/Gridlines.js +29 -58
- package/esm/LinearGenomeView/components/Header.d.ts +1 -1
- package/esm/LinearGenomeView/components/Header.js +42 -16
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderPanControls.js +18 -8
- package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
- package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +38 -52
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +21 -25
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +8 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +13 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
- package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
- package/esm/LinearGenomeView/components/ImportForm.js +95 -61
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -6
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +88 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +14 -10
- package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
- package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
- package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
- package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +25 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +29 -67
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +87 -83
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +57 -32
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
- package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
- package/esm/LinearGenomeView/components/PaddingBlocks.js +56 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +19 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +2 -3
- package/esm/LinearGenomeView/components/Rubberband.js +15 -17
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +8 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
- package/esm/LinearGenomeView/components/Scalebar.js +20 -22
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +157 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +61 -68
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +5 -4
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +6 -8
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +5 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +31 -56
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +3 -5
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
- package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
- package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +136 -38
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +20 -26
- package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
- package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +35 -87
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +5 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +66 -24
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +53 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -3
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -26
- package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
- package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
- package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +6 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +46 -0
- package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
- package/esm/LinearGenomeView/components/searchModes.js +22 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +9 -67
- package/esm/LinearGenomeView/components/useRangeSelect.js +54 -102
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -3
- package/esm/LinearGenomeView/components/useSideScroll.js +163 -45
- package/esm/LinearGenomeView/components/util.d.ts +24 -6
- package/esm/LinearGenomeView/components/util.js +28 -5
- package/esm/LinearGenomeView/consts.d.ts +9 -2
- package/esm/LinearGenomeView/consts.js +20 -2
- package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
- package/esm/LinearGenomeView/containingLgv.js +23 -0
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +29 -0
- package/esm/LinearGenomeView/headerFit.js +72 -0
- package/esm/LinearGenomeView/index.d.ts +28 -3
- package/esm/LinearGenomeView/index.js +13 -7
- package/esm/LinearGenomeView/keyboardHandler.d.ts +9 -0
- package/esm/LinearGenomeView/keyboardHandler.js +25 -1
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +27 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +8 -14
- package/esm/LinearGenomeView/lazyDialogs.js +4 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +12 -0
- package/esm/LinearGenomeView/linkedViewSync.js +36 -0
- package/esm/LinearGenomeView/menuItems.d.ts +25 -2
- package/esm/LinearGenomeView/menuItems.js +306 -179
- package/esm/LinearGenomeView/model.d.ts +3363 -164
- package/esm/LinearGenomeView/model.js +2548 -565
- package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
- package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.js +50 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +15 -0
- package/esm/LinearGenomeView/stickyChrome.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +17 -18
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +34 -35
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +73 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +20 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +36 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +66 -39
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +9 -7
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +54 -9
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +9 -15
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +17 -21
- package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
- package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +245 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +96 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +242 -4
- package/esm/LinearGenomeView/types.d.ts +20 -37
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +347 -12
- package/esm/LinearGenomeView/util.js +577 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +40 -0
- package/esm/MultiLevelRubberband/index.d.ts +4 -0
- package/esm/MultiLevelRubberband/index.js +3 -0
- package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
- package/esm/MultiLevelRubberband/menuItems.js +52 -0
- package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
- package/esm/MultiLevelRubberband/rowLabel.js +27 -0
- package/esm/MultiLevelRubberband/types.d.ts +7 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +25 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +120 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1391 -0
- package/esm/displayKitTests/perRegionTestEnv.js +142 -0
- package/esm/index.d.ts +50 -1245
- package/esm/index.js +88 -33
- package/esm/searchUtils.d.ts +62 -12
- package/esm/searchUtils.js +335 -48
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +34 -0
- package/esm/shared/coordLabels.d.ts +47 -0
- package/esm/shared/coordLabels.js +133 -0
- package/esm/shared/useWindowDrag.d.ts +18 -0
- package/esm/shared/useWindowDrag.js +45 -0
- package/package.json +18 -19
- package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
- package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
- package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/esm/BaseLinearDisplay/components/Block.js +0 -45
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
- package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
- package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
- package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/util.js +0 -107
- package/esm/BaseLinearDisplay/index.d.ts +0 -17
- package/esm/BaseLinearDisplay/index.js +0 -13
- package/esm/BaseLinearDisplay/model.d.ts +0 -1197
- package/esm/BaseLinearDisplay/model.js +0 -432
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
- package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
- package/esm/BaseLinearDisplay/models/util.js +0 -43
- package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
- package/esm/BaseLinearDisplay/renderSvg.js +0 -63
- package/esm/BaseLinearDisplay/types.d.ts +0 -43
- package/esm/BaseLinearDisplay/types.js +0 -3
- package/esm/BaseLinearDisplay/util.d.ts +0 -16
- package/esm/BaseLinearDisplay/util.js +0 -71
- package/esm/BasicTrack/configSchema.d.ts +0 -85
- package/esm/BasicTrack/configSchema.js +0 -8
- package/esm/BasicTrack/index.d.ts +0 -2
- package/esm/BasicTrack/index.js +0 -12
- package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBareDisplay/configSchema.js +0 -11
- package/esm/LinearBareDisplay/index.d.ts +0 -4
- package/esm/LinearBareDisplay/index.js +0 -20
- package/esm/LinearBareDisplay/model.d.ts +0 -1196
- package/esm/LinearBareDisplay/model.js +0 -32
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
- package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBasicDisplay/configSchema.js +0 -11
- package/esm/LinearBasicDisplay/index.d.ts +0 -4
- package/esm/LinearBasicDisplay/index.js +0 -20
- package/esm/LinearBasicDisplay/model.d.ts +0 -1391
- package/esm/LinearBasicDisplay/model.js +0 -158
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
- package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
- package/esm/LinearFeatureDisplay/configSchema.js +0 -11
- package/esm/LinearFeatureDisplay/index.d.ts +0 -3
- package/esm/LinearFeatureDisplay/index.js +0 -2
- package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
- package/esm/LinearFeatureDisplay/model.js +0 -305
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
- package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
- package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
- package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
- package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
- package/esm/LinearGenomeView/svgExportUtil.js +0 -6
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
- /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import ZoomTransform from './ZoomTransform.js';
|
|
5
|
+
import { elidedBlockStyles } from './util.js';
|
|
6
|
+
const useStyles = makeStyles()(theme => ({
|
|
7
|
+
absoluteFill: {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
width: '100%',
|
|
10
|
+
height: '100%',
|
|
11
|
+
},
|
|
12
|
+
block: {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
height: '100%',
|
|
15
|
+
},
|
|
16
|
+
boundaryBlock: {
|
|
17
|
+
background: theme.palette.action.disabledBackground,
|
|
18
|
+
},
|
|
19
|
+
// opaque, since a translucent fill would darken unevenly where the
|
|
20
|
+
// container-level and per-track PaddingBlocks overlap
|
|
21
|
+
regionSeparator: {
|
|
22
|
+
background: theme.palette.regionSeparator,
|
|
23
|
+
},
|
|
24
|
+
elided: {
|
|
25
|
+
...elidedBlockStyles,
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
// Inter-region padding, elided, and boundary blocks plus region separators.
|
|
29
|
+
// In TracksContainer: renders before children (masks gridlines in inter-track
|
|
30
|
+
// margins at inter-region positions; TrackContainers paint on top).
|
|
31
|
+
// In TrackContainer: renders after TrackRenderingContainer within the Paper
|
|
32
|
+
// stacking context, masking the track canvas at inter-region positions while
|
|
33
|
+
// TrackLabel (zIndex:200) remains above it.
|
|
34
|
+
const PaddingBlocks = observer(function PaddingBlocks({ model, offset = 0, }) {
|
|
35
|
+
const { classes } = useStyles();
|
|
36
|
+
// the geometry is `model.paddingSpans` -- shared with any host drawing this
|
|
37
|
+
// itself, so a seam here and a seam in an embedder's own chrome can't be
|
|
38
|
+
// computed two different ways. This file owns only what the spans look like.
|
|
39
|
+
const spans = model.paddingSpans;
|
|
40
|
+
// Nothing to mask, so no positioned container to hold it — the common case,
|
|
41
|
+
// since a view sitting inside one contig has no seam, elision or boundary.
|
|
42
|
+
// The wrapper is not free: `ZoomTransform` reads `staticBlocks`, so an empty
|
|
43
|
+
// one still re-rendered and rewrote its transform on every gesture frame, per
|
|
44
|
+
// track. The view returns one shared array here, so this bails without even
|
|
45
|
+
// re-rendering.
|
|
46
|
+
if (spans.length === 0) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
const kindClass = {
|
|
50
|
+
seam: classes.regionSeparator,
|
|
51
|
+
elided: classes.elided,
|
|
52
|
+
boundary: classes.boundaryBlock,
|
|
53
|
+
};
|
|
54
|
+
return (_jsx(ZoomTransform, { model: model, offset: offset, children: _jsx("div", { className: classes.absoluteFill, children: spans.map(({ x, width, kind }, i) => (_jsx("div", { className: cx(classes.block, kindClass[kind]), style: { transform: `translateX(${x}px)`, width } }, i))) }) }));
|
|
55
|
+
});
|
|
56
|
+
export default PaddingBlocks;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
import type { useRangeSelect } from './useRangeSelect.ts';
|
|
3
|
+
type LGV = LinearGenomeViewModel;
|
|
4
|
+
declare const RangeSelectOverlay: ({ model, range, menuOffsetX, }: {
|
|
5
|
+
model: LGV;
|
|
6
|
+
range: ReturnType<typeof useRangeSelect>;
|
|
7
|
+
menuOffsetX?: number;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
export default RangeSelectOverlay;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Menu } from '@jbrowse/core/ui';
|
|
3
|
+
import { getBpDisplayStr, stringify } from '@jbrowse/core/util';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import RubberbandSpan from '../../shared/RubberbandSpan.js';
|
|
6
|
+
import { stickyChromeTops } from '../stickyChrome.js';
|
|
7
|
+
import VerticalGuide from './VerticalGuide.js';
|
|
8
|
+
const RangeSelectOverlay = observer(function RangeSelectOverlay({ model, range, menuOffsetX = 0, }) {
|
|
9
|
+
const { stickyViewHeaders, headerHeight, isScalebarRefNameMenuOpen } = model;
|
|
10
|
+
const { scalebar } = stickyChromeTops({ stickyViewHeaders, headerHeight });
|
|
11
|
+
const { guideX, rubberband, anchorPosition, isClick, handleMenuItemClick, handleClose, } = range;
|
|
12
|
+
return (_jsxs(_Fragment, { children: [guideX !== undefined && !isScalebarRefNameMenuOpen ? (_jsx(VerticalGuide, { model: model, coordX: guideX })) : rubberband && !isClick ? (_jsx(RubberbandSpan, { left: rubberband.left, width: rubberband.width, viewWidth: model.width, stickyTop: scalebar, leftLabel: stringify(rubberband.leftBpOffset), rightLabel: stringify(rubberband.rightBpOffset), size: getBpDisplayStr(rubberband.numOfBpSelected) })) : null, anchorPosition ? (_jsx(Menu, { anchorReference: "anchorPosition", anchorPosition: {
|
|
13
|
+
left: anchorPosition.clientX + menuOffsetX,
|
|
14
|
+
top: anchorPosition.clientY,
|
|
15
|
+
}, onMenuItemClick: handleMenuItemClick, open: true, onClose: handleClose, menuItems: isClick
|
|
16
|
+
? model.rubberbandClickMenuItems(model.pxToBp(anchorPosition.offsetX))
|
|
17
|
+
: model.rubberBandMenuItems() })) : null] }));
|
|
18
|
+
});
|
|
19
|
+
export default RangeSelectOverlay;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../model.ts';
|
|
2
|
-
|
|
2
|
+
export default function RegionWidthEditorDialog({ model, handleClose, }: {
|
|
3
3
|
model: LinearGenomeViewModel;
|
|
4
4
|
handleClose: () => void;
|
|
5
|
-
})
|
|
6
|
-
export default RegionWidthEditorDialog;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { toLocale } from '@jbrowse/core/util';
|
|
5
|
-
import {
|
|
6
|
-
import { observer } from 'mobx-react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { SubmitDialog } from '@jbrowse/core/ui';
|
|
4
|
+
import { parseBpString, toLocale } from '@jbrowse/core/util';
|
|
5
|
+
import { TextField, Typography } from '@mui/material';
|
|
7
6
|
function format(n) {
|
|
8
7
|
return toLocale(Math.floor(n));
|
|
9
8
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", onClick: () => {
|
|
26
|
-
model.zoomTo(+val2 / model.width);
|
|
27
|
-
handleClose();
|
|
28
|
-
}, children: "Submit" })] })] }));
|
|
29
|
-
});
|
|
30
|
-
export default RegionWidthEditorDialog;
|
|
9
|
+
// not an observer: the initial value is seeded once and the field is
|
|
10
|
+
// user-edited thereafter, so it shouldn't reactively reset if bpPerPx changes
|
|
11
|
+
export default function RegionWidthEditorDialog({ model, handleClose, }) {
|
|
12
|
+
const [val, setVal] = useState(() => format(model.bpPerPx * model.width));
|
|
13
|
+
const bp = parseBpString(val);
|
|
14
|
+
const valid = bp !== undefined && bp > 0;
|
|
15
|
+
return (_jsx(SubmitDialog, { open: true, maxWidth: "xs", fullWidth: true, title: "Edit zoom level", onCancel: handleClose, submitDisabled: !valid, onSubmit: () => {
|
|
16
|
+
if (valid) {
|
|
17
|
+
model.zoomTo(bp / model.width);
|
|
18
|
+
}
|
|
19
|
+
handleClose();
|
|
20
|
+
}, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 30 }, children: [_jsx(Typography, { children: "Enter a specific number of base pairs to change the viewport to show, either in full or abbreviated as e.g. 500kb or 1.5Mbp. This is approximate and does not account for padding between regions or off-screen scrolling" }), _jsx(TextField, { label: "Zoom level (bp)", autoFocus: true, fullWidth: true, variant: "outlined", value: val, onChange: event => {
|
|
21
|
+
setVal(event.target.value);
|
|
22
|
+
} })] }) }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useLayoutEffect, useRef } from 'react';
|
|
3
|
+
import { ResizeHandle } from '@jbrowse/core/ui';
|
|
4
|
+
import { scrollPortOf } from '@jbrowse/core/util/hooks';
|
|
5
|
+
import { isAlive } from '@jbrowse/mobx-state-tree';
|
|
6
|
+
import { observer } from 'mobx-react';
|
|
7
|
+
import { RESIZE_ALL_HANDLE_HEIGHT } from '../consts.js';
|
|
8
|
+
function useScrollPortExcess(ref, model, enabled) {
|
|
9
|
+
useLayoutEffect(() => {
|
|
10
|
+
const box = ref.current?.closest('[data-testid^="view-container-"]') ??
|
|
11
|
+
ref.current?.closest('[data-testid^="linear-genome-view-"]');
|
|
12
|
+
if (!enabled || !box || !('ResizeObserver' in window)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const port = scrollPortOf(box);
|
|
16
|
+
const measure = () => {
|
|
17
|
+
const { marginTop, marginBottom } = getComputedStyle(box);
|
|
18
|
+
const outer = box.getBoundingClientRect().height +
|
|
19
|
+
Number.parseFloat(marginTop) +
|
|
20
|
+
Number.parseFloat(marginBottom);
|
|
21
|
+
model.setScrollPortExcess(Math.round(outer - (port?.clientHeight ?? window.innerHeight)));
|
|
22
|
+
};
|
|
23
|
+
measure();
|
|
24
|
+
const observer = new ResizeObserver(measure);
|
|
25
|
+
observer.observe(box);
|
|
26
|
+
if (port) {
|
|
27
|
+
observer.observe(port);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
window.addEventListener('resize', measure);
|
|
31
|
+
}
|
|
32
|
+
return () => {
|
|
33
|
+
observer.disconnect();
|
|
34
|
+
window.removeEventListener('resize', measure);
|
|
35
|
+
if (isAlive(model)) {
|
|
36
|
+
model.setScrollPortExcess(undefined);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}, [ref, model, enabled]);
|
|
40
|
+
}
|
|
41
|
+
const ResizeAllTracksHandle = observer(function ResizeAllTracksHandle({ model, }) {
|
|
42
|
+
const ref = useRef(null);
|
|
43
|
+
const drag = useRef({ from: new Map(), moved: 0 });
|
|
44
|
+
const { isTopLevelView } = model;
|
|
45
|
+
useScrollPortExcess(ref, model, isTopLevelView);
|
|
46
|
+
return (_jsx("div", { ref: ref, style: isTopLevelView
|
|
47
|
+
? { position: 'sticky', bottom: 0, zIndex: 300 }
|
|
48
|
+
: { position: 'relative', height: 0, zIndex: 300 }, children: _jsx(ResizeHandle, { grip: isTopLevelView || 'hover', "data-testid": "resize-all-tracks", title: isTopLevelView
|
|
49
|
+
? 'Drag to resize all tracks, double-click to fit them to the window'
|
|
50
|
+
: 'Drag to resize all tracks', style: isTopLevelView
|
|
51
|
+
? { height: RESIZE_ALL_HANDLE_HEIGHT }
|
|
52
|
+
: {
|
|
53
|
+
height: RESIZE_ALL_HANDLE_HEIGHT,
|
|
54
|
+
position: 'absolute',
|
|
55
|
+
bottom: 0,
|
|
56
|
+
}, onDragStart: () => {
|
|
57
|
+
drag.current = { from: model.resizableTrackHeights, moved: 0 };
|
|
58
|
+
for (const track of model.tracks) {
|
|
59
|
+
track.setResizing(true);
|
|
60
|
+
}
|
|
61
|
+
}, onDrag: distance => {
|
|
62
|
+
drag.current.moved = model.resizeTracks(drag.current.moved + distance, drag.current.from);
|
|
63
|
+
}, onDragEnd: () => {
|
|
64
|
+
for (const track of model.tracks) {
|
|
65
|
+
track.setResizing(false);
|
|
66
|
+
}
|
|
67
|
+
}, onDoubleClick: () => {
|
|
68
|
+
model.fitTracksToWindow();
|
|
69
|
+
} }) }));
|
|
70
|
+
});
|
|
71
|
+
export default ResizeAllTracksHandle;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
type LGV = LinearGenomeViewModel;
|
|
3
|
-
declare const Rubberband: ({ model
|
|
3
|
+
declare const Rubberband: ({ model }: {
|
|
4
4
|
model: LGV;
|
|
5
|
-
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
7
6
|
export default Rubberband;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from 'react';
|
|
3
|
-
import { Menu } from '@jbrowse/core/ui';
|
|
4
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
4
|
import { observer } from 'mobx-react';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import { stickyChromeTops } from '../stickyChrome.js';
|
|
6
|
+
import RangeSelectOverlay from './RangeSelectOverlay.js';
|
|
7
|
+
import Scalebar from './Scalebar.js';
|
|
8
|
+
import { useRangeSelect } from './useRangeSelect.js';
|
|
9
9
|
const useStyles = makeStyles()({
|
|
10
10
|
rubberbandControl: {
|
|
11
11
|
cursor: 'crosshair',
|
|
@@ -14,19 +14,17 @@ const useStyles = makeStyles()({
|
|
|
14
14
|
zIndex: 825,
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
const Rubberband = observer(function Rubberband({ model
|
|
17
|
+
const Rubberband = observer(function Rubberband({ model }) {
|
|
18
18
|
const ref = useRef(null);
|
|
19
19
|
const { classes } = useStyles();
|
|
20
|
-
const { stickyViewHeaders,
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
position: stickyViewHeaders ? 'sticky' : undefined,
|
|
30
|
-
}, ref: ref, onMouseDown: mouseDown, onMouseMove: mouseMove, onMouseOut: mouseOut, children: ControlComponent })] }));
|
|
20
|
+
const { stickyViewHeaders, headerHeight } = model;
|
|
21
|
+
const { scalebar } = stickyChromeTops({ stickyViewHeaders, headerHeight });
|
|
22
|
+
const range = useRangeSelect(ref, model);
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsx(RangeSelectOverlay, { model: model, range: range, menuOffsetX: 10 }), _jsx("div", { "data-testid": "rubberband_controls", className: classes.rubberbandControl, style: scalebar ? { top: scalebar, position: 'sticky' } : undefined, ref: ref, onMouseDown: range.mouseDown, onMouseMove: range.mouseMove,
|
|
24
|
+
// mouseleave, not mouseout, matching the other useRangeSelect instance
|
|
25
|
+
// (TracksContainer): mouseout bubbles from every child, so crossing a
|
|
26
|
+
// refName or coordinate label inside the scalebar cleared the guide and
|
|
27
|
+
// the next mousemove put it straight back
|
|
28
|
+
onMouseLeave: range.mouseOut, children: _jsx(Scalebar, { model: model }) })] }));
|
|
31
29
|
});
|
|
32
30
|
export default Rubberband;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getFillProps } from '@jbrowse/core/util';
|
|
3
|
+
// One full-height SVG highlight band with an optional label at the top,
|
|
4
|
+
// mirroring the on-screen HighlightBand div. The label is hidden on bands too
|
|
5
|
+
// narrow to fit it.
|
|
6
|
+
export default function SVGHighlightBand({ coords, height, color, label, labelColor, }) {
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx("rect", { x: coords.left, y: 0, width: coords.width, height: height, ...getFillProps(color) }), label && coords.width > 3 ? (_jsx("text", { x: coords.left + 3, y: 2, fontSize: 11, dominantBaseline: "hanging", ...getFillProps(labelColor), children: label })) : null] }));
|
|
8
|
+
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
|
-
|
|
3
|
+
declare const Scalebar: ({ model }: {
|
|
5
4
|
model: LGV;
|
|
6
|
-
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const Scalebar: ({ model, style, className, ...other }: ScalebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
10
6
|
export default Scalebar;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
3
|
import { Paper } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { SCALE_BAR_HEIGHT } from '../consts.js';
|
|
6
|
+
import Gridlines from './Gridlines.js';
|
|
7
|
+
import PaddingBlocks from './PaddingBlocks.js';
|
|
8
|
+
import ScalebarCoordinateLabels from './ScalebarCoordinateLabels.js';
|
|
9
|
+
import ScalebarRefNameLabels from './ScalebarRefNameLabels.js';
|
|
8
10
|
const useStyles = makeStyles()({
|
|
11
|
+
// clip, not hidden: this holds a staticBlocks-width strip of labels, and a
|
|
12
|
+
// scroll container here can be scrolled by the browser (focus,
|
|
13
|
+
// scrollIntoView) with no scrollbar to show it, sliding the coordinates out
|
|
14
|
+
// of register with the tracks. clip cannot be scrolled at all
|
|
9
15
|
container: {
|
|
10
|
-
overflow: '
|
|
16
|
+
overflow: 'clip',
|
|
11
17
|
position: 'relative',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
position: 'relative',
|
|
15
|
-
},
|
|
16
|
-
scalebar: {
|
|
17
|
-
position: 'absolute',
|
|
18
|
-
display: 'flex',
|
|
19
|
-
pointerEvents: 'none',
|
|
18
|
+
height: SCALE_BAR_HEIGHT,
|
|
19
|
+
boxSizing: 'border-box',
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
|
-
const Scalebar = observer(function Scalebar({ model
|
|
22
|
+
const Scalebar = observer(function Scalebar({ model }) {
|
|
23
23
|
const { classes } = useStyles();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
width: staticBlocks.totalWidthPx,
|
|
31
|
-
}, children: _jsx(ScalebarCoordinateLabels, { model: model }) }) }), _jsx(ScalebarRefNameLabels, { model: model })] }));
|
|
24
|
+
return (_jsxs(Paper
|
|
25
|
+
// The rubberband owns presses on the scalebar (it wraps this), so the
|
|
26
|
+
// view's click-drag pan must not also start one
|
|
27
|
+
// on the paths where the rubberband doesn't stopPropagation — a press with
|
|
28
|
+
// the refName menu already open. See ResizeHandle for the marker contract.
|
|
29
|
+
, { "data-gesture-owner": "true", className: classes.container, variant: "outlined", children: [_jsx(Gridlines, { model: model, offset: 1 }), _jsx(PaddingBlocks, { model: model, offset: 1 }), _jsx(ScalebarCoordinateLabels, { model: model }), _jsx(ScalebarRefNameLabels, { model: model })] }));
|
|
32
30
|
});
|
|
33
31
|
export default Scalebar;
|
|
@@ -2,5 +2,5 @@ import type { LinearGenomeViewModel } from '../index.ts';
|
|
|
2
2
|
type LGV = LinearGenomeViewModel;
|
|
3
3
|
declare const ScalebarCoordinateLabels: ({ model, }: {
|
|
4
4
|
model: LGV;
|
|
5
|
-
}) => import("react
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
6
6
|
export default ScalebarCoordinateLabels;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getTickDisplayStr } from '@jbrowse/core/util';
|
|
3
2
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
3
|
import { observer } from 'mobx-react';
|
|
5
|
-
import {
|
|
4
|
+
import { TICK_LABEL_FONT_SIZE, refNameLabelSpanPx, tickLabelWidth, } from '../util.js';
|
|
6
5
|
const useStyles = makeStyles()(theme => ({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
// spans the full staticBlocks width; labels are absolutely positioned within
|
|
7
|
+
// it so a label on an internal (~800px) block boundary is no longer clipped.
|
|
8
|
+
// Absolute (with top/left left at their static position, i.e. the top-left of
|
|
9
|
+
// the scalebar Paper) so a strip wider than the viewport adds no flow width
|
|
10
|
+
container: {
|
|
11
|
+
position: 'absolute',
|
|
11
12
|
height: 13,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
pointerEvents: 'none',
|
|
14
|
+
// clip rather than hidden so this never becomes a scroll container (see
|
|
15
|
+
// Scalebar)
|
|
16
|
+
overflow: 'clip',
|
|
16
17
|
},
|
|
17
18
|
tick: {
|
|
18
19
|
position: 'absolute',
|
|
@@ -21,37 +22,55 @@ const useStyles = makeStyles()(theme => ({
|
|
|
21
22
|
justifyContent: 'center',
|
|
22
23
|
pointerEvents: 'none',
|
|
23
24
|
},
|
|
24
|
-
|
|
25
|
-
fontSize:
|
|
25
|
+
tickLabel: {
|
|
26
|
+
fontSize: TICK_LABEL_FONT_SIZE,
|
|
26
27
|
zIndex: 1,
|
|
27
|
-
background: theme.palette.background.paper,
|
|
28
28
|
lineHeight: 'normal',
|
|
29
29
|
pointerEvents: 'none',
|
|
30
|
+
// paper backing so the number stays readable over the gridline behind it
|
|
31
|
+
background: theme.palette.background.paper,
|
|
32
|
+
padding: '0 2px',
|
|
30
33
|
},
|
|
31
34
|
}));
|
|
32
|
-
function ContentBlockLabels({ block, bpPerPx, }) {
|
|
33
|
-
const { classes } = useStyles();
|
|
34
|
-
const ticks = makeTicks(block.start, block.end, bpPerPx, true, false);
|
|
35
|
-
return (_jsx("div", { className: classes.block, style: { width: block.widthPx }, children: ticks.map(({ type, base }) => {
|
|
36
|
-
if (type !== 'major') {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
const x = (block.reversed ? block.end - base : base - block.start) / bpPerPx;
|
|
40
|
-
return (_jsx("div", { className: classes.tick, style: { left: x }, children: _jsx("div", { className: classes.label, children: getTickDisplayStr(base + 1, bpPerPx) }) }, base));
|
|
41
|
-
}) }));
|
|
42
|
-
}
|
|
43
35
|
const ScalebarCoordinateLabels = observer(function ScalebarCoordinateLabels({ model, }) {
|
|
44
|
-
const { classes
|
|
45
|
-
const { staticBlocks,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
const { classes } = useStyles();
|
|
37
|
+
const { scalebarLabels, staticBlocks, staticBlocksTranslateX } = model;
|
|
38
|
+
// labels are laid out in the staticBlocks frame, which overhangs the
|
|
39
|
+
// viewport; shift it into view (the -1 clears the left track border, as
|
|
40
|
+
// Gridlines/PaddingBlocks do with their `offset` prop). Rounded, unlike
|
|
41
|
+
// ZoomTransform: these children are text, and a fractional offset blurs it.
|
|
42
|
+
const offsetLeft = Math.round(staticBlocksTranslateX);
|
|
43
|
+
// `runRefNameLabelPx` keeps the numbers out from under a refName label at its
|
|
44
|
+
// run's left edge, in this frame, which is what lets scalebarLabels stay
|
|
45
|
+
// stable across a scroll. It cannot reach the label pinned to the VIEWPORT's
|
|
46
|
+
// left edge, whose x is a function of the scroll — and that one is drawn over
|
|
47
|
+
// a run whose own left edge is off screen, so nothing reserved for it. The
|
|
48
|
+
// number underneath came out with its leading digits painted over: "22,000"
|
|
49
|
+
// showing as ",000" reads as a coordinate, just not the right one. Hide it
|
|
50
|
+
// instead, the same call the run-start reservation makes, and hide rather
|
|
51
|
+
// than drop so the node count this list pools stays put.
|
|
52
|
+
//
|
|
53
|
+
// The row's caption chip is the other one: it sits at x=0, outside the block
|
|
54
|
+
// frame for the same reason, and now draws on a plain LGV too whenever the
|
|
55
|
+
// row is flipped.
|
|
56
|
+
const { labels, caption, captionSpanPx } = model.scalebarRefNameLabels;
|
|
57
|
+
const sticky = labels.find(l => l.sticky);
|
|
58
|
+
const covered = [
|
|
59
|
+
...(sticky ? [refNameLabelSpanPx(sticky)] : []),
|
|
60
|
+
...(caption === undefined ? [] : [{ left: 0, right: captionSpanPx }]),
|
|
61
|
+
];
|
|
62
|
+
return (_jsx("div", { className: classes.container, style: {
|
|
63
|
+
width: staticBlocks.totalWidthPx,
|
|
64
|
+
transform: `translateX(${offsetLeft - 1}px)`,
|
|
65
|
+
}, children: scalebarLabels.map(({ x, label }, i) => {
|
|
66
|
+
const halfWidth = tickLabelWidth(label) / 2;
|
|
67
|
+
const centerPx = offsetLeft - 1 + x;
|
|
68
|
+
const hidden = covered.some(span => centerPx - halfWidth < span.right &&
|
|
69
|
+
centerPx + halfWidth > span.left);
|
|
70
|
+
return (_jsx("div", { className: classes.tick, style: {
|
|
71
|
+
transform: `translateX(${x}px)`,
|
|
72
|
+
visibility: hidden ? 'hidden' : undefined,
|
|
73
|
+
}, children: _jsx("div", { className: classes.tickLabel, children: label }) }, i));
|
|
55
74
|
}) }));
|
|
56
75
|
});
|
|
57
76
|
export default ScalebarCoordinateLabels;
|
|
@@ -2,5 +2,5 @@ import type { LinearGenomeViewModel } from '../index.ts';
|
|
|
2
2
|
type LGV = LinearGenomeViewModel;
|
|
3
3
|
declare const ScalebarRefNameLabels: ({ model, }: {
|
|
4
4
|
model: LGV;
|
|
5
|
-
}) => import("react
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
6
6
|
export default ScalebarRefNameLabels;
|