@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
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
3
|
+
import { getNotificationSink, stringify } from '@jbrowse/core/util';
|
|
4
|
+
import { getRelativeX } from '@jbrowse/core/util/getRelativeX';
|
|
4
5
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
6
|
import { observer } from 'mobx-react';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import RubberbandSpan from '../../shared/RubberbandSpan.js';
|
|
8
|
+
import { useWindowDrag } from '../../shared/useWindowDrag.js';
|
|
9
|
+
import OverviewRubberbandHoverTooltip from './OverviewRubberbandHoverTooltip.js';
|
|
10
|
+
import { overviewPxToBp } from './util.js';
|
|
9
11
|
const useStyles = makeStyles()({
|
|
10
12
|
rubberbandControl: {
|
|
11
13
|
cursor: 'crosshair',
|
|
@@ -24,55 +26,31 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
|
|
|
24
26
|
const controlsRef = useRef(null);
|
|
25
27
|
const { classes } = useStyles();
|
|
26
28
|
const mouseDragging = startX !== undefined;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
|
|
29
|
+
useWindowDrag(controlsRef, startX, {
|
|
30
|
+
onMove: setCurrentX,
|
|
31
|
+
onEnd: ({ startX, endX, isClick }) => {
|
|
32
|
+
if (!isClick) {
|
|
33
|
+
model.moveTo(overviewPxToBp(overview, Math.min(startX, endX), cytobandOffset), overviewPxToBp(overview, Math.max(startX, endX), cytobandOffset));
|
|
32
34
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const left = Math.min(startX, currentX);
|
|
38
|
-
const right = Math.max(startX, currentX);
|
|
39
|
-
model.moveTo(overview.pxToBp(left - cytobandOffset), overview.pxToBp(right - cytobandOffset));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (startX !== undefined && currentX === undefined) {
|
|
43
|
-
const click = overview.pxToBp(startX - cytobandOffset);
|
|
44
|
-
if (!click.refName) {
|
|
45
|
-
getSession(model).notify('unknown position clicked');
|
|
46
|
-
console.error('unknown position clicked', click);
|
|
35
|
+
else {
|
|
36
|
+
const click = overviewPxToBp(overview, startX, cytobandOffset);
|
|
37
|
+
if (click.refName) {
|
|
38
|
+
model.centerAt(click.coord0, click.refName, click.index);
|
|
47
39
|
}
|
|
48
40
|
else {
|
|
49
|
-
model.
|
|
41
|
+
getNotificationSink(model).notify('unknown position clicked');
|
|
42
|
+
console.error('unknown position clicked', click);
|
|
50
43
|
}
|
|
51
44
|
}
|
|
52
45
|
setStartX(undefined);
|
|
53
46
|
setCurrentX(undefined);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
setCurrentX(undefined);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (mouseDragging) {
|
|
65
|
-
window.addEventListener('mousemove', globalMouseMove, true);
|
|
66
|
-
window.addEventListener('mouseup', globalMouseUp, true);
|
|
67
|
-
window.addEventListener('keydown', globalKeyDown, true);
|
|
68
|
-
return () => {
|
|
69
|
-
window.removeEventListener('mousemove', globalMouseMove, true);
|
|
70
|
-
window.removeEventListener('mouseup', globalMouseUp, true);
|
|
71
|
-
window.removeEventListener('keydown', globalKeyDown, true);
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
return () => { };
|
|
75
|
-
}, [mouseDragging, currentX, startX, model, overview, cytobandOffset]);
|
|
47
|
+
setGuideX(undefined);
|
|
48
|
+
},
|
|
49
|
+
onCancel: () => {
|
|
50
|
+
setStartX(undefined);
|
|
51
|
+
setCurrentX(undefined);
|
|
52
|
+
},
|
|
53
|
+
});
|
|
76
54
|
function mouseDown(event) {
|
|
77
55
|
event.preventDefault();
|
|
78
56
|
event.stopPropagation();
|
|
@@ -84,25 +62,9 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
|
|
|
84
62
|
function mouseOut() {
|
|
85
63
|
setGuideX(undefined);
|
|
86
64
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
let width = 0;
|
|
92
|
-
if (currentX !== undefined) {
|
|
93
|
-
left = Math.min(currentX, startX);
|
|
94
|
-
width = currentX - startX;
|
|
95
|
-
}
|
|
96
|
-
let leftBpOffset;
|
|
97
|
-
let rightBpOffset;
|
|
98
|
-
if (startX) {
|
|
99
|
-
leftBpOffset = overview.pxToBp(startX - cytobandOffset);
|
|
100
|
-
rightBpOffset = overview.pxToBp(startX + width - cytobandOffset);
|
|
101
|
-
if (currentX !== undefined && currentX < startX) {
|
|
102
|
-
;
|
|
103
|
-
[leftBpOffset, rightBpOffset] = [rightBpOffset, leftBpOffset];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return (_jsxs("div", { className: classes.rel, children: [leftBpOffset && rightBpOffset ? (_jsx(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, width: Math.abs(width), left: left })) : null, _jsx("div", { "data-testid": "rubberband_controls", className: classes.rubberbandControl, ref: controlsRef, onMouseDown: mouseDown, onMouseOut: mouseOut, onMouseMove: mouseMove, children: ControlComponent })] }));
|
|
65
|
+
const endX = currentX ?? startX;
|
|
66
|
+
const leftPx = mouseDragging ? Math.min(startX, endX) : 0;
|
|
67
|
+
const rightPx = mouseDragging ? Math.max(startX, endX) : 0;
|
|
68
|
+
return (_jsxs("div", { className: classes.rel, children: [!mouseDragging && guideX !== undefined ? (_jsx(OverviewRubberbandHoverTooltip, { model: model, overview: overview, guideX: guideX })) : null, mouseDragging ? (_jsx(RubberbandSpan, { leftLabel: stringify(overviewPxToBp(overview, leftPx, cytobandOffset)), rightLabel: stringify(overviewPxToBp(overview, rightPx, cytobandOffset)), width: rightPx - leftPx, left: leftPx, viewWidth: overview.width, stickyTop: undefined })) : null, _jsx("div", { "data-testid": mouseDragging ? 'rubberband_controls' : undefined, className: classes.rubberbandControl, ref: controlsRef, onMouseDown: mouseDown, onMouseLeave: mouseOut, onMouseMove: mouseMove, children: ControlComponent })] }));
|
|
107
69
|
});
|
|
108
70
|
export default OverviewRubberband;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
|
|
3
3
|
type LGV = LinearGenomeViewModel;
|
|
4
|
-
declare const OverviewRubberbandHoverTooltip: ({ model,
|
|
4
|
+
declare const OverviewRubberbandHoverTooltip: ({ model, guideX, overview, }: {
|
|
5
5
|
model: LGV;
|
|
6
|
-
open: boolean;
|
|
7
6
|
guideX: number;
|
|
8
|
-
overview:
|
|
9
|
-
}) => import("react
|
|
7
|
+
overview: ViewLayout;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
10
9
|
export default OverviewRubberbandHoverTooltip;
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getSession, stringify } from '@jbrowse/core/util';
|
|
3
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
-
import { Tooltip } from '@mui/material';
|
|
5
3
|
import { observer } from 'mobx-react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
const OverviewRubberbandHoverTooltip = observer(function OverviewRubberbandHoverTooltip({ model, open, guideX, overview, }) {
|
|
16
|
-
const { classes } = useStyles();
|
|
4
|
+
import { GuideLabel } from '../../shared/coordLabels.js';
|
|
5
|
+
import { overviewPxToBp } from './util.js';
|
|
6
|
+
// Label only, no guide line: the overview already marks position with the
|
|
7
|
+
// visible-region box, and unlike the LGV/multi-level guides this one never had a
|
|
8
|
+
// background, so the 1px div it used to render painted nothing while still
|
|
9
|
+
// taking a transform patch per mousemove. Add a background here if a visible
|
|
10
|
+
// line is ever wanted.
|
|
11
|
+
const OverviewRubberbandHoverTooltip = observer(function OverviewRubberbandHoverTooltip({ model, guideX, overview, }) {
|
|
17
12
|
const { cytobandOffset } = model;
|
|
18
13
|
const { assemblyManager } = getSession(model);
|
|
19
|
-
const px = overview
|
|
14
|
+
const px = overviewPxToBp(overview, guideX, cytobandOffset);
|
|
20
15
|
const assembly = assemblyManager.get(px.assemblyName);
|
|
21
16
|
const cytoband = assembly?.cytobands?.find(f => px.coord > f.get('start') &&
|
|
22
17
|
px.coord < f.get('end') &&
|
|
23
|
-
px.refName === assembly.
|
|
24
|
-
return (_jsx(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
cytoband?.get('type'),
|
|
28
|
-
].join(' '), arrow: true, children: _jsx("div", { className: classes.guide, style: { transform: `translateX(${guideX}px)` } }) }));
|
|
18
|
+
px.refName === assembly.getCanonicalRefName2(f.get('refName')));
|
|
19
|
+
return (_jsx(GuideLabel, { coordX: guideX, viewWidth: overview.width, stickyTop: undefined, children: [stringify(px), cytoband?.get('name'), cytoband?.get('type')]
|
|
20
|
+
.filter(Boolean)
|
|
21
|
+
.join(' ') }));
|
|
29
22
|
});
|
|
30
23
|
export default OverviewRubberbandHoverTooltip;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
type LGV = LinearGenomeViewModel;
|
|
3
4
|
declare const OverviewScalebar: ({ model, children, }: {
|
|
4
5
|
model: LGV;
|
|
5
|
-
children:
|
|
6
|
-
}) => import("react
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
7
8
|
export default OverviewScalebar;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PluggableElements } from '@jbrowse/core/ui';
|
|
3
|
+
import { alpha } from '@jbrowse/core/ui/palette';
|
|
3
4
|
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
4
|
-
import Base1DView from '@jbrowse/core/util/Base1DViewModel';
|
|
5
5
|
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
-
import { Typography
|
|
6
|
+
import { Typography } from '@mui/material';
|
|
7
7
|
import { observer } from 'mobx-react';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
8
|
+
import { HEADER_BAR_HEIGHT, HEADER_OVERVIEW_HEIGHT } from '../consts.js';
|
|
9
|
+
import { REF_NAME_LABEL_FONT_SIZE, getBlockRefName, showRefNameLabels, } from '../util.js';
|
|
10
|
+
import Cytobands from './Cytobands.js';
|
|
11
|
+
import OverviewHighlight from './OverviewHighlight.js';
|
|
12
|
+
import OverviewRubberband from './OverviewRubberband.js';
|
|
13
|
+
import OverviewScalebarPolygon from './OverviewScalebarPolygon.js';
|
|
14
|
+
import OverviewScalebarTickLabels from './OverviewScalebarTickLabels.js';
|
|
15
|
+
import { elidedBlockStyles, getCytobands } from './util.js';
|
|
16
16
|
const useStyles = makeStyles()(theme => ({
|
|
17
17
|
scalebar: {
|
|
18
18
|
height: HEADER_OVERVIEW_HEIGHT,
|
|
@@ -27,7 +27,16 @@ const useStyles = makeStyles()(theme => ({
|
|
|
27
27
|
top: 0,
|
|
28
28
|
left: 0,
|
|
29
29
|
height: HEADER_OVERVIEW_HEIGHT,
|
|
30
|
-
|
|
30
|
+
// clip rather than hidden so this never becomes a scroll container (see
|
|
31
|
+
// Scalebar)
|
|
32
|
+
overflow: 'clip',
|
|
33
|
+
},
|
|
34
|
+
// cytoband strip keeps a fixed light backdrop in both light/dark mode: the
|
|
35
|
+
// Giemsa greyscale runs to pure black (gpos100/gvar), which would vanish on
|
|
36
|
+
// the dark theme's background.default. UCSC/IGV likewise draw the ideogram on
|
|
37
|
+
// a fixed white strip.
|
|
38
|
+
scalebarContigCytoband: {
|
|
39
|
+
backgroundColor: theme.palette.common.white,
|
|
31
40
|
},
|
|
32
41
|
scalebarContigForward: {
|
|
33
42
|
backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 9'%3E%3Cpath d='M-.1 0L6 4.5L-.1 9' fill='none' stroke='${theme.palette.divider}'/%3E%3C/svg%3E")`,
|
|
@@ -39,10 +48,19 @@ const useStyles = makeStyles()(theme => ({
|
|
|
39
48
|
},
|
|
40
49
|
scalebarRefName: {
|
|
41
50
|
position: 'absolute',
|
|
42
|
-
|
|
51
|
+
top: 0,
|
|
52
|
+
fontSize: REF_NAME_LABEL_FONT_SIZE,
|
|
43
53
|
fontWeight: 'bold',
|
|
44
54
|
pointerEvents: 'none',
|
|
45
55
|
zIndex: 100,
|
|
56
|
+
// clip, not hidden: transform is patched per zoom frame, and clip keeps this
|
|
57
|
+
// out of the scroll-container path. ellipsis renders identically under clip
|
|
58
|
+
// (verified pixel-for-pixel), since text-overflow applies at any non-visible
|
|
59
|
+
// overflow
|
|
60
|
+
overflow: 'clip',
|
|
61
|
+
whiteSpace: 'nowrap',
|
|
62
|
+
textOverflow: 'ellipsis',
|
|
63
|
+
maxWidth: 'calc(100% - 6px)',
|
|
46
64
|
},
|
|
47
65
|
scalebarVisibleRegion: {
|
|
48
66
|
position: 'absolute',
|
|
@@ -53,7 +71,10 @@ const useStyles = makeStyles()(theme => ({
|
|
|
53
71
|
left: 0,
|
|
54
72
|
},
|
|
55
73
|
overview: {
|
|
56
|
-
|
|
74
|
+
// the band the "you are here" trapezoid is drawn over, and the box the
|
|
75
|
+
// controls row sits in — a minimum so the row can outgrow it, since the
|
|
76
|
+
// svg above is absolutely positioned and does not hold it open
|
|
77
|
+
minHeight: HEADER_BAR_HEIGHT,
|
|
57
78
|
position: 'relative',
|
|
58
79
|
},
|
|
59
80
|
overviewSvg: {
|
|
@@ -61,89 +82,72 @@ const useStyles = makeStyles()(theme => ({
|
|
|
61
82
|
width: '100%',
|
|
62
83
|
position: 'absolute',
|
|
63
84
|
},
|
|
85
|
+
elidedOverviewBlock: {
|
|
86
|
+
...elidedBlockStyles,
|
|
87
|
+
},
|
|
88
|
+
cytoSvg: {
|
|
89
|
+
width: '100%',
|
|
90
|
+
},
|
|
64
91
|
}));
|
|
65
|
-
const OverviewBox = observer(function OverviewBox({
|
|
66
|
-
const { classes } = useStyles();
|
|
67
|
-
const
|
|
68
|
-
const { cytobandOffset, showCytobands } = model;
|
|
92
|
+
const OverviewBox = observer(function OverviewBox({ model, block, showRefName, }) {
|
|
93
|
+
const { classes, theme } = useStyles();
|
|
94
|
+
const { cytobandOffset, effectiveShowCytobands, overviewLayout: overview, } = model;
|
|
69
95
|
const { reversed, refName, assemblyName } = block;
|
|
70
96
|
const { assemblyManager } = getSession(model);
|
|
71
97
|
const assembly = assemblyManager.get(assemblyName);
|
|
72
98
|
const refNameColor = assembly?.getRefNameColor(refName);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
const cytobands = effectiveShowCytobands
|
|
100
|
+
? getCytobands(assembly, refName)
|
|
101
|
+
: [];
|
|
102
|
+
const canDisplayCytobands = cytobands.length > 0;
|
|
103
|
+
if (canDisplayCytobands) {
|
|
104
|
+
return (_jsxs(_Fragment, { children: [showRefName ? (_jsx(Typography, { style: {
|
|
105
|
+
// fixed dark: this label overlays the always-white cytoband strip,
|
|
106
|
+
// so text.primary (white in dark mode) would be invisible
|
|
107
|
+
color: theme.palette.common.black,
|
|
108
|
+
transform: `translateX(${block.offsetPx + 3}px)`,
|
|
109
|
+
}, className: classes.scalebarRefName, children: refName })) : null, _jsx("div", { className: cx(classes.scalebarContig, classes.scalebarContigCytoband), style: {
|
|
110
|
+
transform: `translateX(${block.offsetPx + cytobandOffset}px)`,
|
|
111
|
+
width: block.widthPx,
|
|
112
|
+
}, children: _jsx("svg", { className: classes.cytoSvg, children: _jsx(Cytobands, { overview: overview, cytobands: cytobands, block: block }) }) })] }));
|
|
113
|
+
}
|
|
114
|
+
return (_jsxs("div", { className: cx(classes.scalebarContig, reversed
|
|
115
|
+
? classes.scalebarContigReverse
|
|
116
|
+
: classes.scalebarContigForward, classes.scalebarBorder), style: {
|
|
117
|
+
transform: `translateX(${block.offsetPx + cytobandOffset}px)`,
|
|
118
|
+
width: block.widthPx,
|
|
119
|
+
borderColor: refNameColor,
|
|
120
|
+
}, children: [showRefName ? (_jsx(Typography, { style: { color: refNameColor, left: 3 }, className: classes.scalebarRefName, children: refName })) : null, _jsx(OverviewScalebarTickLabels, { model: model, block: block, refNameColor: refNameColor, showRefName: showRefName })] }));
|
|
88
121
|
});
|
|
89
|
-
const VisibleRegionBox = observer(function VisibleRegionBox({ model,
|
|
90
|
-
const theme =
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
const visibleRegions = dynamicBlocks.contentBlocks;
|
|
94
|
-
if (!visibleRegions.length) {
|
|
122
|
+
const VisibleRegionBox = observer(function VisibleRegionBox({ model, }) {
|
|
123
|
+
const { classes, theme } = useStyles();
|
|
124
|
+
const { effectiveShowCytobands, cytobandOffset, overviewRegionPxSpan: span, } = model;
|
|
125
|
+
if (!span) {
|
|
95
126
|
return null;
|
|
96
127
|
}
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
refName: last.refName,
|
|
105
|
-
coord: last.reversed ? last.start : last.end,
|
|
106
|
-
}) || 0;
|
|
107
|
-
const color = showCytobands ? '#f00' : scalebarColor;
|
|
108
|
-
const transparency = showCytobands ? 0.1 : 0.3;
|
|
109
|
-
const left = firstOverviewPx + cytobandOffset;
|
|
110
|
-
return (_jsx("div", { className: className, style: {
|
|
111
|
-
width: lastOverviewPx - firstOverviewPx,
|
|
112
|
-
transform: `translateX(${left}px)`,
|
|
113
|
-
background: alpha(color, transparency),
|
|
128
|
+
const { color, opacity } = effectiveShowCytobands
|
|
129
|
+
? { color: '#f00', opacity: 0.1 }
|
|
130
|
+
: { color: theme.palette.tertiary.light, opacity: 0.3 };
|
|
131
|
+
return (_jsx("div", { className: classes.scalebarVisibleRegion, style: {
|
|
132
|
+
width: span.rightPx - span.leftPx,
|
|
133
|
+
transform: `translateX(${span.leftPx + cytobandOffset}px)`,
|
|
134
|
+
background: alpha(color, opacity),
|
|
114
135
|
borderColor: color,
|
|
115
136
|
} }));
|
|
116
137
|
});
|
|
117
|
-
const
|
|
138
|
+
const OverviewScalebarContent = observer(function OverviewScalebarContent({ model, }) {
|
|
118
139
|
const { classes } = useStyles();
|
|
119
140
|
const { pluginManager } = getEnv(model);
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
return (_jsxs("div", { className: classes.scalebar, children: [_jsx(VisibleRegionBox, { model: model,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
backgroundColor: '#999',
|
|
127
|
-
backgroundImage: 'repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,.5) 1px, rgba(255,255,255,.5) 3px)',
|
|
128
|
-
} }, `${JSON.stringify(block)}-${idx}`)) : (_jsx(OverviewBox, { scale: scale, block: block, model: model, overview: overview }, `${JSON.stringify(block)}-${idx}`));
|
|
129
|
-
}), _jsx(OverviewHighlight, { model: model, overview: overview }), additional] }));
|
|
141
|
+
const { overviewLayout: overview, overviewBlocks } = model;
|
|
142
|
+
const showRefName = showRefNameLabels(overviewBlocks, getBlockRefName);
|
|
143
|
+
return (_jsxs("div", { className: classes.scalebar, children: [_jsx(VisibleRegionBox, { model: model }), overviewBlocks.map((block, i) => block.type === 'ContentBlock' ? (_jsx(OverviewBox, { block: block, model: model, showRefName: showRefName[i] }, block.key)) : block.type === 'ElidedBlock' ? (_jsx("div", { className: cx(classes.scalebarContig, classes.elidedOverviewBlock), style: {
|
|
144
|
+
width: block.widthPx,
|
|
145
|
+
transform: `translateX(${block.offsetPx}px)`,
|
|
146
|
+
} }, block.key)) : null), _jsx(OverviewHighlight, { model: model }), _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-OverviewScalebarComponent", props: { model, overview } })] }));
|
|
130
147
|
});
|
|
131
148
|
const OverviewScalebar = observer(function OverviewScalebar({ model, children, }) {
|
|
132
149
|
const { classes } = useStyles();
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
const str = JSON.stringify(displayedRegions);
|
|
136
|
-
const overview = useMemo(() => {
|
|
137
|
-
const overview = Base1DView.create({
|
|
138
|
-
displayedRegions: JSON.parse(str),
|
|
139
|
-
interRegionPaddingWidth: 0,
|
|
140
|
-
minimumBlockWidth,
|
|
141
|
-
});
|
|
142
|
-
overview.setVolatileWidth(modWidth);
|
|
143
|
-
overview.showAllRegions();
|
|
144
|
-
return overview;
|
|
145
|
-
}, [str, minimumBlockWidth, modWidth]);
|
|
146
|
-
const scale = totalBp / (modWidth - (displayedRegions.length - 1) * wholeSeqSpacer);
|
|
147
|
-
return (_jsxs("div", { children: [_jsx(OverviewRubberband, { model: model, overview: overview, ControlComponent: _jsx(Scalebar, { model: model, overview: overview, scale: scale }) }), _jsxs("div", { className: classes.overview, children: [_jsx("svg", { height: HEADER_BAR_HEIGHT, className: classes.overviewSvg, children: _jsx(OverviewScalebarPolygon, { model: model, overview: overview }) }), children] })] }));
|
|
150
|
+
const overview = model.overviewLayout;
|
|
151
|
+
return (_jsxs("div", { children: [_jsx(OverviewRubberband, { model: model, overview: overview, ControlComponent: _jsx(OverviewScalebarContent, { model: model }) }), _jsxs("div", { className: classes.overview, children: [_jsx("svg", { height: HEADER_BAR_HEIGHT, className: classes.overviewSvg, children: _jsx(OverviewScalebarPolygon, { model: model, overview: overview, overviewOffsetPx: model.cytobandOffset }) }), children] })] }));
|
|
148
152
|
});
|
|
149
153
|
export default OverviewScalebar;
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
|
|
3
|
+
/**
|
|
4
|
+
* The "you are here" connector: a trapezoid joining the visible region's extent
|
|
5
|
+
* in the overview (top edge) to that same extent in the main view (bottom
|
|
6
|
+
* edge). Both edges come from one pixel extent, so they always describe the
|
|
7
|
+
* same regions — including elided ones.
|
|
8
|
+
*
|
|
9
|
+
* @param overviewOffsetPx - pixels the overview is shifted right of the main
|
|
10
|
+
* view's origin. In the interactive view the overview clears the chromosome-
|
|
11
|
+
* name gap (cytobandOffset); in SVG export it is flush (0).
|
|
12
|
+
* @param exportSvg - serialize explicit fill/stroke attributes (the split the
|
|
13
|
+
* `getFill/StrokeProps` helpers exist for) instead of the on-screen CSS class,
|
|
14
|
+
* which wouldn't survive into a standalone exported SVG.
|
|
15
|
+
*/
|
|
16
|
+
declare const OverviewScalebarPolygon: ({ model, overview, overviewOffsetPx, exportSvg, }: {
|
|
4
17
|
model: LinearGenomeViewModel;
|
|
5
|
-
overview:
|
|
6
|
-
|
|
7
|
-
|
|
18
|
+
overview: ViewLayout;
|
|
19
|
+
overviewOffsetPx?: number;
|
|
20
|
+
exportSvg?: boolean;
|
|
21
|
+
}) => import("react").JSX.Element | null;
|
|
8
22
|
export default OverviewScalebarPolygon;
|
|
@@ -1,39 +1,64 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { alpha } from '@jbrowse/core/ui/palette';
|
|
2
3
|
import { getFillProps, getStrokeProps } from '@jbrowse/core/util';
|
|
3
|
-
import {
|
|
4
|
+
import { regionBlocksPxExtent, transformPxSpan, } from '@jbrowse/core/util/Base1DUtils';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
6
|
import { observer } from 'mobx-react';
|
|
5
|
-
import { HEADER_BAR_HEIGHT } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
import { HEADER_BAR_HEIGHT } from '../consts.js';
|
|
8
|
+
/**
|
|
9
|
+
* SVG points for a trapezoid with horizontal top and bottom edges, wound as a
|
|
10
|
+
* single non-self-intersecting loop (bottom-left → bottom-right → top-right →
|
|
11
|
+
* top-left).
|
|
12
|
+
*/
|
|
13
|
+
function trapezoidPoints(top, bottom, height) {
|
|
14
|
+
return [
|
|
15
|
+
[bottom.leftPx, height],
|
|
16
|
+
[bottom.rightPx, height],
|
|
17
|
+
[top.rightPx, 0],
|
|
18
|
+
[top.leftPx, 0],
|
|
19
|
+
]
|
|
20
|
+
.map(([x, y]) => `${x},${y}`)
|
|
21
|
+
.join(' ');
|
|
22
|
+
}
|
|
23
|
+
// Fill/stroke are theme-derived and zoom-invariant, so they live in a static
|
|
24
|
+
// class computed once per theme (makeStyles memoizes) — an on-screen zoom frame
|
|
25
|
+
// then does zero color parsing. SVG export can't carry a CSS class, so that path
|
|
26
|
+
// serializes explicit fill/stroke attributes instead (see `exportSvg` below).
|
|
27
|
+
const FILL_OPACITY = 0.3;
|
|
28
|
+
const STROKE_OPACITY = 0.8;
|
|
29
|
+
const useStyles = makeStyles()(theme => ({
|
|
30
|
+
polygon: {
|
|
31
|
+
fill: alpha(theme.palette.tertiary.light, FILL_OPACITY),
|
|
32
|
+
stroke: alpha(theme.palette.tertiary.light, STROKE_OPACITY),
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
35
|
+
/**
|
|
36
|
+
* The "you are here" connector: a trapezoid joining the visible region's extent
|
|
37
|
+
* in the overview (top edge) to that same extent in the main view (bottom
|
|
38
|
+
* edge). Both edges come from one pixel extent, so they always describe the
|
|
39
|
+
* same regions — including elided ones.
|
|
40
|
+
*
|
|
41
|
+
* @param overviewOffsetPx - pixels the overview is shifted right of the main
|
|
42
|
+
* view's origin. In the interactive view the overview clears the chromosome-
|
|
43
|
+
* name gap (cytobandOffset); in SVG export it is flush (0).
|
|
44
|
+
* @param exportSvg - serialize explicit fill/stroke attributes (the split the
|
|
45
|
+
* `getFill/StrokeProps` helpers exist for) instead of the on-screen CSS class,
|
|
46
|
+
* which wouldn't survive into a standalone exported SVG.
|
|
47
|
+
*/
|
|
48
|
+
const OverviewScalebarPolygon = observer(function OverviewScalebarPolygon({ model, overview, overviewOffsetPx = 0, exportSvg = false, }) {
|
|
49
|
+
const { classes, theme } = useStyles();
|
|
50
|
+
const { offsetPx, bpPerPx, dynamicBlocks } = model;
|
|
51
|
+
const extent = regionBlocksPxExtent(dynamicBlocks.blocks);
|
|
52
|
+
if (!extent) {
|
|
13
53
|
return null;
|
|
14
54
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
refName: last.refName,
|
|
24
|
-
coord: last.reversed ? last.start : last.end,
|
|
25
|
-
}) || 0) +
|
|
26
|
-
cytobandOffset * multiplier;
|
|
27
|
-
const startPx = Math.max(0, -offsetPx);
|
|
28
|
-
const endPx = startPx +
|
|
29
|
-
totalWidthPxWithoutBorders +
|
|
30
|
-
(contentBlocks.length * interRegionPaddingWidth) / 2;
|
|
31
|
-
const points = [
|
|
32
|
-
[startPx, HEADER_BAR_HEIGHT],
|
|
33
|
-
[endPx, HEADER_BAR_HEIGHT],
|
|
34
|
-
[topRight, 0],
|
|
35
|
-
[topLeft, 0],
|
|
36
|
-
];
|
|
37
|
-
return (_jsx("polygon", { points: points.toString(), ...getFillProps(alpha(polygonColor, 0.3)), ...getStrokeProps(alpha(polygonColor, 0.8)) }));
|
|
55
|
+
// the main view and overview lay out the same regions from cumulative-bp 0,
|
|
56
|
+
// so a main-view pixel maps to the (more zoomed-out) overview by the bpPerPx
|
|
57
|
+
// ratio; the bottom edge is the same extent in main-view space, shifted by
|
|
58
|
+
// the scroll offset
|
|
59
|
+
const top = transformPxSpan(extent, bpPerPx / overview.bpPerPx, overviewOffsetPx);
|
|
60
|
+
const bottom = transformPxSpan(extent, 1, -offsetPx);
|
|
61
|
+
const points = trapezoidPoints(top, bottom, HEADER_BAR_HEIGHT);
|
|
62
|
+
return exportSvg ? (_jsx("polygon", { points: points, ...getFillProps(alpha(theme.palette.tertiary.light, FILL_OPACITY)), ...getStrokeProps(alpha(theme.palette.tertiary.light, STROKE_OPACITY)) })) : (_jsx("polygon", { points: points, className: classes.polygon }));
|
|
38
63
|
});
|
|
39
64
|
export default OverviewScalebarPolygon;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
3
2
|
import type { ContentBlock } from '@jbrowse/core/util/blockTypes';
|
|
4
|
-
declare const OverviewScalebarTickLabels: ({ block,
|
|
3
|
+
declare const OverviewScalebarTickLabels: ({ block, model, refNameColor, showRefName, }: {
|
|
5
4
|
model: LinearGenomeViewModel;
|
|
6
|
-
scale: number;
|
|
7
5
|
block: ContentBlock;
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
refNameColor: string | undefined;
|
|
7
|
+
showRefName: boolean;
|
|
8
|
+
}) => import("react").JSX.Element[];
|
|
10
9
|
export default OverviewScalebarTickLabels;
|
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getSession, getTickDisplayStr } from '@jbrowse/core/util';
|
|
3
2
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
3
|
import { Typography } from '@mui/material';
|
|
5
4
|
import { observer } from 'mobx-react';
|
|
6
|
-
import { HEADER_OVERVIEW_HEIGHT } from
|
|
7
|
-
import {
|
|
5
|
+
import { HEADER_OVERVIEW_HEIGHT } from '../consts.js';
|
|
6
|
+
import { TICK_LABEL_FONT_SIZE, makeOverviewTickLabels, overviewRefNameLabelWidth, } from '../util.js';
|
|
8
7
|
const useStyles = makeStyles()({
|
|
9
8
|
scalebarLabel: {
|
|
10
9
|
height: HEADER_OVERVIEW_HEIGHT,
|
|
11
10
|
position: 'absolute',
|
|
12
11
|
left: 0,
|
|
13
12
|
display: 'flex',
|
|
14
|
-
|
|
13
|
+
// 11px, not body2: makeOverviewTickLabels drops labels too wide for their
|
|
14
|
+
// block using tickLabelWidth, which measures at 11px
|
|
15
|
+
fontSize: TICK_LABEL_FONT_SIZE,
|
|
15
16
|
pointerEvents: 'none',
|
|
16
17
|
},
|
|
17
18
|
});
|
|
18
|
-
const OverviewScalebarTickLabels = observer(function OverviewScalebarTickLabels({ block,
|
|
19
|
+
const OverviewScalebarTickLabels = observer(function OverviewScalebarTickLabels({ block, model, refNameColor, showRefName, }) {
|
|
19
20
|
const { classes } = useStyles();
|
|
20
|
-
const {
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
return tickLabels.map((tickLabel, labelIdx) => (_jsx(Typography, { className: classes.scalebarLabel, variant: "body2", style: {
|
|
31
|
-
transform: `translateX(${((labelIdx + 1) * majorPitch) / scale}px)`,
|
|
21
|
+
const { refName } = block;
|
|
22
|
+
const { bpPerPx } = model.overviewLayout;
|
|
23
|
+
return makeOverviewTickLabels({
|
|
24
|
+
block,
|
|
25
|
+
bpPerPx,
|
|
26
|
+
// the bold refName label pinned at the block's left edge takes precedence
|
|
27
|
+
refNameLabelPx: showRefName ? overviewRefNameLabelWidth(refName) : 0,
|
|
28
|
+
}).map(({ genomicCoord, offsetPx, label }) => (_jsx(Typography, { className: classes.scalebarLabel, style: {
|
|
29
|
+
transform: `translateX(${offsetPx}px)`,
|
|
32
30
|
color: refNameColor,
|
|
33
|
-
}, children:
|
|
31
|
+
}, children: label }, genomicCoord)));
|
|
34
32
|
});
|
|
35
33
|
export default OverviewScalebarTickLabels;
|