@jbrowse/plugin-linear-genome-view 4.2.1 → 5.0.0-beta.1
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 +104 -65
- 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 +17 -12
- package/esm/LinearGenomeView/FloatingSvgOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/FloatingSvgOverlay.js +25 -0
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +257 -88
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +16 -7
- 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 +144 -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 +7 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -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 +32 -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 +16 -7
- 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 +67 -51
- package/esm/LinearGenomeView/components/Highlight.d.ts +3 -7
- package/esm/LinearGenomeView/components/Highlight.js +30 -82
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightBand.js +40 -0
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +15 -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 +6 -5
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +13 -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 -42
- package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +26 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
- 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 +84 -79
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -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 +51 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/Rubberband.js +13 -16
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/Scalebar.js +16 -21
- 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 +142 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +58 -66
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
- 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 +1 -1
- 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 +83 -39
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
- 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 +32 -85
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
- package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomButton.js +22 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +33 -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 +7 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -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 +11 -66
- package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
- package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
- package/esm/LinearGenomeView/components/util.d.ts +20 -6
- package/esm/LinearGenomeView/components/util.js +27 -6
- package/esm/LinearGenomeView/consts.d.ts +7 -2
- package/esm/LinearGenomeView/consts.js +18 -2
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +27 -0
- package/esm/LinearGenomeView/headerFit.js +59 -0
- package/esm/LinearGenomeView/index.d.ts +32 -2
- package/esm/LinearGenomeView/index.js +8 -4
- package/esm/LinearGenomeView/initKeys.d.ts +13 -0
- package/esm/LinearGenomeView/initKeys.js +104 -0
- package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
- package/esm/LinearGenomeView/keyboardHandler.js +10 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +6 -10
- package/esm/LinearGenomeView/lazyDialogs.js +3 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
- package/esm/LinearGenomeView/linkedViewSync.js +52 -0
- package/esm/LinearGenomeView/menuItems.d.ts +27 -2
- package/esm/LinearGenomeView/menuItems.js +137 -101
- package/esm/LinearGenomeView/model.d.ts +1544 -136
- package/esm/LinearGenomeView/model.js +2352 -488
- 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 +44 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
- package/esm/LinearGenomeView/stickyChrome.js +30 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
- 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 +77 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -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 +263 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
- package/esm/LinearGenomeView/types.d.ts +17 -29
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +332 -12
- package/esm/LinearGenomeView/util.js +606 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
- package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
- package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
- package/esm/MultiLevelRubberband/index.d.ts +2 -0
- package/esm/MultiLevelRubberband/index.js +1 -0
- package/esm/MultiLevelRubberband/types.d.ts +6 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1263 -0
- package/esm/displayKitTests/perRegionTestEnv.js +141 -0
- package/esm/index.d.ts +112 -1237
- package/esm/index.js +102 -24
- package/esm/lazyPluginExports.d.ts +23 -0
- package/esm/lazyPluginExports.js +36 -0
- package/esm/searchUtils.d.ts +52 -11
- package/esm/searchUtils.js +318 -45
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +33 -0
- package/esm/shared/coordLabels.d.ts +40 -0
- package/esm/shared/coordLabels.js +119 -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 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -17
- 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 -89
- 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,32 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The one thing that tells a screen-reader user a pan, a zoom or a search
|
|
4
|
+
* actually moved the view: a polite live region restating where the view now is.
|
|
5
|
+
*
|
|
6
|
+
* **It reads `coarseVisibleLocStrings`, never `visibleLocStrings`**, and that is
|
|
7
|
+
* the whole design. The fine one changes on every `offsetPx` write — every frame
|
|
8
|
+
* of a drag, a wheel zoom or a keyboard slide — and a live region driven by it
|
|
9
|
+
* queues an utterance per frame, which does not merely say too much: it makes
|
|
10
|
+
* the screen reader unusable for as long as the drag lasts, because polite
|
|
11
|
+
* announcements are a queue rather than a latest-value. The coarse blocks are
|
|
12
|
+
* already the view's settled signal, published by a `delay: 500` autorun
|
|
13
|
+
* (`setupCoarseDynamicBlocksAutorun`) and flushed synchronously by `moveTo` so a
|
|
14
|
+
* discrete jump — a search, a bookmark, `navToLocString` — announces at once
|
|
15
|
+
* instead of 500ms later. Both properties are what this needs, so this adds no
|
|
16
|
+
* timer of its own; if the debounce ever moves, this moves with it.
|
|
17
|
+
*
|
|
18
|
+
* Its own observer so the view container does not re-render when the locus
|
|
19
|
+
* settles: this component is a text node with no children, and the container
|
|
20
|
+
* mounts every track.
|
|
21
|
+
*
|
|
22
|
+
* The region is rendered with its text from the first render rather than being
|
|
23
|
+
* filled after mount. A live region whose content is present when the node is
|
|
24
|
+
* inserted is generally not announced (the region has to exist before the
|
|
25
|
+
* change), so in practice a freshly-mounted view says nothing; where a reader
|
|
26
|
+
* does announce it, "chr1:1..1,000" as the view appears is a fair thing to hear,
|
|
27
|
+
* and it is one utterance per view rather than one per frame.
|
|
28
|
+
*/
|
|
29
|
+
declare const NavigationAnnouncer: ({ model, }: {
|
|
30
|
+
model: LinearGenomeViewModel;
|
|
31
|
+
}) => import("react").JSX.Element;
|
|
32
|
+
export default NavigationAnnouncer;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
3
|
+
// Off-screen but not `display:none` / `visibility:hidden` / `aria-hidden` — any
|
|
4
|
+
// of those takes the node out of the accessibility tree, which is exactly what a
|
|
5
|
+
// live region must not be. The 1px-clipped box is the long-standing spelling of
|
|
6
|
+
// "readable by assistive tech, occupying no layout".
|
|
7
|
+
const visuallyHidden = {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
width: 1,
|
|
10
|
+
height: 1,
|
|
11
|
+
margin: -1,
|
|
12
|
+
padding: 0,
|
|
13
|
+
border: 0,
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
clipPath: 'inset(50%)',
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The one thing that tells a screen-reader user a pan, a zoom or a search
|
|
20
|
+
* actually moved the view: a polite live region restating where the view now is.
|
|
21
|
+
*
|
|
22
|
+
* **It reads `coarseVisibleLocStrings`, never `visibleLocStrings`**, and that is
|
|
23
|
+
* the whole design. The fine one changes on every `offsetPx` write — every frame
|
|
24
|
+
* of a drag, a wheel zoom or a keyboard slide — and a live region driven by it
|
|
25
|
+
* queues an utterance per frame, which does not merely say too much: it makes
|
|
26
|
+
* the screen reader unusable for as long as the drag lasts, because polite
|
|
27
|
+
* announcements are a queue rather than a latest-value. The coarse blocks are
|
|
28
|
+
* already the view's settled signal, published by a `delay: 500` autorun
|
|
29
|
+
* (`setupCoarseDynamicBlocksAutorun`) and flushed synchronously by `moveTo` so a
|
|
30
|
+
* discrete jump — a search, a bookmark, `navToLocString` — announces at once
|
|
31
|
+
* instead of 500ms later. Both properties are what this needs, so this adds no
|
|
32
|
+
* timer of its own; if the debounce ever moves, this moves with it.
|
|
33
|
+
*
|
|
34
|
+
* Its own observer so the view container does not re-render when the locus
|
|
35
|
+
* settles: this component is a text node with no children, and the container
|
|
36
|
+
* mounts every track.
|
|
37
|
+
*
|
|
38
|
+
* The region is rendered with its text from the first render rather than being
|
|
39
|
+
* filled after mount. A live region whose content is present when the node is
|
|
40
|
+
* inserted is generally not announced (the region has to exist before the
|
|
41
|
+
* change), so in practice a freshly-mounted view says nothing; where a reader
|
|
42
|
+
* does announce it, "chr1:1..1,000" as the view appears is a fair thing to hear,
|
|
43
|
+
* and it is one utterance per view rather than one per frame.
|
|
44
|
+
*/
|
|
45
|
+
const NavigationAnnouncer = observer(function NavigationAnnouncer({ model, }) {
|
|
46
|
+
const { coarseVisibleLocStrings, coarseTotalBpDisplayStr } = model;
|
|
47
|
+
return (_jsx("div", { role: "status", "aria-live": "polite", "aria-atomic": "true", style: visuallyHidden, children: coarseVisibleLocStrings
|
|
48
|
+
? `${coarseVisibleLocStrings} (${coarseTotalBpDisplayStr})`
|
|
49
|
+
: '' }));
|
|
50
|
+
});
|
|
51
|
+
export default NavigationAnnouncer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
3
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
4
|
import { Button, Paper, Typography } from '@mui/material';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../model.ts';
|
|
2
|
-
import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
|
-
declare const OverviewHighlight: ({ model,
|
|
3
|
+
declare const OverviewHighlight: ({ model, }: {
|
|
5
4
|
model: LGV;
|
|
6
|
-
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element[];
|
|
5
|
+
}) => import("react").JSX.Element[] | null;
|
|
8
6
|
export default OverviewHighlight;
|
|
@@ -1,48 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getSession, notEmpty } from '@jbrowse/core/util';
|
|
3
3
|
import { colord } from '@jbrowse/core/util/colord';
|
|
4
|
-
import {
|
|
4
|
+
import { useTheme } from '@mui/material';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
coord: r.start,
|
|
29
|
-
});
|
|
30
|
-
const e = overview.bpToPx({
|
|
31
|
-
...r,
|
|
32
|
-
refName,
|
|
33
|
-
coord: r.end,
|
|
34
|
-
});
|
|
35
|
-
return s !== undefined && e !== undefined
|
|
36
|
-
? {
|
|
37
|
-
width: Math.abs(e - s),
|
|
38
|
-
left: s + cytobandOffset,
|
|
39
|
-
}
|
|
40
|
-
: undefined;
|
|
41
|
-
})
|
|
42
|
-
.filter(notEmpty)
|
|
43
|
-
.map(({ left, width }, idx) => (_jsx("div", { className: classes.highlight, style: {
|
|
44
|
-
width,
|
|
45
|
-
transform: `translateX(${left}px)`,
|
|
46
|
-
} }, `${left}_${width}_${idx}`)));
|
|
6
|
+
import OverviewHighlightBand from './OverviewHighlightBand.js';
|
|
7
|
+
import { getHighlightColor, highlightKey } from './util.js';
|
|
8
|
+
const OverviewHighlight = observer(function OverviewHighlight({ model, }) {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const themed = colord(theme.palette.highlight.main);
|
|
11
|
+
// gate on highlightsVisible to match the main-view band, scalebar band, and
|
|
12
|
+
// SVG export — otherwise "Turn off highlights" leaves the overview bands up
|
|
13
|
+
return getSession(model).highlightsVisible
|
|
14
|
+
? model.highlight
|
|
15
|
+
.map(highlight => {
|
|
16
|
+
const coords = model.getOverviewHighlightCoords(highlight);
|
|
17
|
+
return coords ? { coords, highlight } : undefined;
|
|
18
|
+
})
|
|
19
|
+
.filter(notEmpty)
|
|
20
|
+
.map(({ coords, highlight }, idx) => {
|
|
21
|
+
const bandColor = getHighlightColor(highlight, theme);
|
|
22
|
+
return (_jsx(OverviewHighlightBand
|
|
23
|
+
// region fields keep the key stable across pan/zoom (unlike pixel
|
|
24
|
+
// coords); idx disambiguates duplicate highlights on the region
|
|
25
|
+
, { coords: coords, background: bandColor.toRgbString(), borderColor: (highlight.color ? bandColor : themed).toRgbString(), tooltip: highlight.label }, highlightKey(highlight, idx)));
|
|
26
|
+
})
|
|
27
|
+
: null;
|
|
47
28
|
});
|
|
48
29
|
export default OverviewHighlight;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
import { Tooltip } from '@mui/material';
|
|
4
|
+
// Renders a single absolute-positioned band over the overview scalebar. Used
|
|
5
|
+
// for both LGV `view.highlight` entries and grid-bookmark bookmark highlights.
|
|
6
|
+
// The 1px border keeps very narrow bands visible.
|
|
7
|
+
const useStyles = makeStyles()({
|
|
8
|
+
highlight: {
|
|
9
|
+
height: '100%',
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
left: 0,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
export default function OverviewHighlightBand({ coords, background, borderColor, tooltip, }) {
|
|
15
|
+
const { classes } = useStyles();
|
|
16
|
+
const band = (_jsx("div", { className: classes.highlight, style: {
|
|
17
|
+
transform: `translateX(${coords.left}px)`,
|
|
18
|
+
width: coords.width,
|
|
19
|
+
background,
|
|
20
|
+
...(borderColor && {
|
|
21
|
+
borderLeft: `1px solid ${borderColor}`,
|
|
22
|
+
borderRight: `1px solid ${borderColor}`,
|
|
23
|
+
}),
|
|
24
|
+
} }));
|
|
25
|
+
return tooltip ? (_jsx(Tooltip, { title: tooltip, arrow: true, children: band })) : (band);
|
|
26
|
+
}
|
|
@@ -1,9 +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
4
|
declare const OverviewRubberband: ({ model, overview, ControlComponent, }: {
|
|
5
5
|
model: LGV;
|
|
6
|
-
overview:
|
|
6
|
+
overview: ViewLayout;
|
|
7
7
|
ControlComponent?: React.ReactElement;
|
|
8
|
-
}) => import("react
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
9
|
export default OverviewRubberband;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
|
-
import {
|
|
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 OverviewRubberbandHoverTooltip from './OverviewRubberbandHoverTooltip.js';
|
|
9
|
+
import { overviewPxToBp } from './util.js';
|
|
9
10
|
const useStyles = makeStyles()({
|
|
10
11
|
rubberbandControl: {
|
|
11
12
|
cursor: 'crosshair',
|
|
@@ -25,35 +26,40 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
|
|
|
25
26
|
const { classes } = useStyles();
|
|
26
27
|
const mouseDragging = startX !== undefined;
|
|
27
28
|
useEffect(() => {
|
|
29
|
+
const el = controlsRef.current;
|
|
30
|
+
if (!mouseDragging || !el) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// the container's left edge is fixed for the duration of a drag, so measure
|
|
34
|
+
// it once here rather than calling getBoundingClientRect on every mousemove
|
|
35
|
+
const { left } = el.getBoundingClientRect();
|
|
28
36
|
function globalMouseMove(event) {
|
|
29
|
-
|
|
30
|
-
if (ref && mouseDragging) {
|
|
31
|
-
setCurrentX(getRelativeX(event, ref));
|
|
32
|
-
}
|
|
37
|
+
setCurrentX(event.clientX - left);
|
|
33
38
|
}
|
|
34
|
-
function globalMouseUp() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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);
|
|
39
|
+
function globalMouseUp(event) {
|
|
40
|
+
// read the up position from the event so currentX state doesn't need to
|
|
41
|
+
// be a dep (which would re-subscribe these listeners every mousemove)
|
|
42
|
+
if (startX !== undefined) {
|
|
43
|
+
const offsetX = event.clientX - left;
|
|
44
|
+
if (Math.abs(offsetX - startX) > 3) {
|
|
45
|
+
const leftPx = Math.min(startX, offsetX);
|
|
46
|
+
const rightPx = Math.max(startX, offsetX);
|
|
47
|
+
model.moveTo(overviewPxToBp(overview, leftPx, cytobandOffset), overviewPxToBp(overview, rightPx, cytobandOffset));
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
49
|
-
|
|
50
|
+
const click = overviewPxToBp(overview, startX, cytobandOffset);
|
|
51
|
+
if (click.refName) {
|
|
52
|
+
model.centerAt(click.coord0, click.refName, click.index);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
getNotificationSink(model).notify('unknown position clicked');
|
|
56
|
+
console.error('unknown position clicked', click);
|
|
57
|
+
}
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
60
|
setStartX(undefined);
|
|
53
61
|
setCurrentX(undefined);
|
|
54
|
-
|
|
55
|
-
setGuideX(undefined);
|
|
56
|
-
}
|
|
62
|
+
setGuideX(undefined);
|
|
57
63
|
}
|
|
58
64
|
function globalKeyDown(event) {
|
|
59
65
|
if (event.key === 'Escape') {
|
|
@@ -61,18 +67,15 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
|
|
|
61
67
|
setCurrentX(undefined);
|
|
62
68
|
}
|
|
63
69
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
return () => { };
|
|
75
|
-
}, [mouseDragging, currentX, startX, model, overview, cytobandOffset]);
|
|
70
|
+
window.addEventListener('mousemove', globalMouseMove);
|
|
71
|
+
window.addEventListener('mouseup', globalMouseUp);
|
|
72
|
+
window.addEventListener('keydown', globalKeyDown);
|
|
73
|
+
return () => {
|
|
74
|
+
window.removeEventListener('mousemove', globalMouseMove);
|
|
75
|
+
window.removeEventListener('mouseup', globalMouseUp);
|
|
76
|
+
window.removeEventListener('keydown', globalKeyDown);
|
|
77
|
+
};
|
|
78
|
+
}, [startX, mouseDragging, model, overview, cytobandOffset]);
|
|
76
79
|
function mouseDown(event) {
|
|
77
80
|
event.preventDefault();
|
|
78
81
|
event.stopPropagation();
|
|
@@ -84,25 +87,9 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
|
|
|
84
87
|
function mouseOut() {
|
|
85
88
|
setGuideX(undefined);
|
|
86
89
|
}
|
|
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 })] }));
|
|
90
|
+
const endX = currentX ?? startX;
|
|
91
|
+
const leftPx = mouseDragging ? Math.min(startX, endX) : 0;
|
|
92
|
+
const rightPx = mouseDragging ? Math.max(startX, endX) : 0;
|
|
93
|
+
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
94
|
});
|
|
108
95
|
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;
|