@jbrowse/plugin-linear-genome-view 3.6.5 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/BaseLinearDisplay/SVGLegend.d.ts +6 -0
- package/esm/BaseLinearDisplay/SVGLegend.js +17 -0
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +2 -0
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +11 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +13 -24
- package/esm/BaseLinearDisplay/components/Block.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockMsg.js +11 -2
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +9 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +42 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +11 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +40 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +19 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +45 -0
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +5 -0
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +89 -0
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +8 -0
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +43 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +1 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +5 -42
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +49 -0
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +26 -0
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +8 -0
- package/esm/BaseLinearDisplay/components/MenuPage.js +24 -0
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +19 -0
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +48 -0
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +12 -0
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +22 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -4
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +5 -8
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +3 -3
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +2 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js +10 -7
- package/esm/BaseLinearDisplay/components/types.d.ts +1 -0
- package/esm/BaseLinearDisplay/components/types.js +1 -0
- package/esm/BaseLinearDisplay/components/util.d.ts +21 -0
- package/esm/BaseLinearDisplay/components/util.js +116 -0
- package/esm/BaseLinearDisplay/index.d.ts +17 -8
- package/esm/BaseLinearDisplay/index.js +13 -6
- package/esm/BaseLinearDisplay/model.d.ts +1177 -0
- package/esm/BaseLinearDisplay/model.js +424 -0
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +5 -5
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +11 -14
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +21 -0
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +46 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +3 -3
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +2 -3
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +1 -1
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +2 -3
- package/esm/BaseLinearDisplay/models/calculateLabelPositions.d.ts +24 -0
- package/esm/BaseLinearDisplay/models/calculateLabelPositions.js +60 -0
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +2 -2
- package/esm/BaseLinearDisplay/models/configSchema.js +3 -3
- package/esm/BaseLinearDisplay/models/renderSvg.d.ts +3 -7
- package/esm/BaseLinearDisplay/models/renderSvg.js +22 -11
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +37 -19
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +151 -135
- package/esm/BaseLinearDisplay/models/util.d.ts +4 -4
- package/esm/BaseLinearDisplay/models/util.js +16 -13
- package/esm/BaseLinearDisplay/renderSvg.d.ts +3 -0
- package/esm/BaseLinearDisplay/renderSvg.js +59 -0
- package/esm/BaseLinearDisplay/types.d.ts +47 -0
- package/esm/BaseLinearDisplay/types.js +3 -0
- package/esm/BaseLinearDisplay/util.d.ts +15 -0
- package/esm/BaseLinearDisplay/util.js +61 -0
- package/esm/BasicTrack/configSchema.d.ts +16 -11
- package/esm/BasicTrack/index.js +1 -1
- package/esm/FeatureTrack/configSchema.d.ts +16 -11
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.js +12 -62
- package/esm/LinearBareDisplay/configSchema.d.ts +4 -4
- package/esm/LinearBareDisplay/configSchema.js +1 -1
- package/esm/LinearBareDisplay/index.d.ts +2 -2
- package/esm/LinearBareDisplay/index.js +5 -5
- package/esm/LinearBareDisplay/model.d.ts +959 -92
- package/esm/LinearBareDisplay/model.js +3 -6
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +5 -0
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +9 -0
- package/esm/LinearBasicDisplay/configSchema.d.ts +4 -4
- package/esm/LinearBasicDisplay/configSchema.js +1 -1
- package/esm/LinearBasicDisplay/index.d.ts +2 -2
- package/esm/LinearBasicDisplay/index.js +6 -6
- package/esm/LinearBasicDisplay/model.d.ts +1134 -122
- package/esm/LinearBasicDisplay/model.js +116 -116
- package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/AddFiltersDialog.js +2 -2
- package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/SetMaxHeightDialog.js +3 -3
- package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/configSchema.d.ts +4 -4
- package/esm/LinearFeatureDisplay/configSchema.js +11 -0
- package/esm/LinearFeatureDisplay/index.d.ts +3 -0
- package/esm/LinearFeatureDisplay/index.js +2 -0
- package/esm/LinearFeatureDisplay/model.d.ts +1415 -0
- package/esm/LinearFeatureDisplay/model.js +265 -0
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +5 -0
- package/esm/LinearGenomeView/SVGErrorBox.js +4 -0
- package/esm/LinearGenomeView/afterAttach.d.ts +5 -0
- package/esm/LinearGenomeView/afterAttach.js +95 -0
- package/esm/LinearGenomeView/components/CenterLine.js +6 -4
- package/esm/LinearGenomeView/components/Cytobands.js +4 -4
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +5 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +8 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +13 -16
- package/esm/LinearGenomeView/components/Gridlines.js +18 -15
- package/esm/LinearGenomeView/components/Header.js +9 -9
- package/esm/LinearGenomeView/components/HeaderPanControls.js +2 -2
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +4 -5
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +2 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +3 -3
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +6 -6
- package/esm/LinearGenomeView/components/ImportForm.d.ts +1 -1
- package/esm/LinearGenomeView/components/ImportForm.js +14 -12
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +3 -3
- package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -7
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +7 -8
- package/esm/LinearGenomeView/components/MiniControls.js +6 -6
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +2 -2
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.js +5 -5
- package/esm/LinearGenomeView/components/OverviewRubberband.js +4 -4
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +9 -5
- package/esm/LinearGenomeView/components/OverviewScalebar.js +36 -28
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +5 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +7 -7
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +10 -10
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +6 -4
- package/esm/LinearGenomeView/components/Rubberband.js +9 -7
- package/esm/LinearGenomeView/components/RubberbandSpan.js +4 -5
- package/esm/LinearGenomeView/components/Scalebar.js +8 -10
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +50 -17
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +13 -11
- package/esm/LinearGenomeView/components/SearchBox.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchBox.js +8 -9
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +2 -2
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.js +4 -6
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +6 -6
- package/esm/LinearGenomeView/components/TrackContainer.js +32 -20
- package/esm/LinearGenomeView/components/TrackLabel.js +10 -11
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +7 -8
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +80 -68
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +5 -5
- package/esm/LinearGenomeView/components/TracksContainer.js +18 -15
- package/esm/LinearGenomeView/components/VerticalGuide.js +5 -3
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -2
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +27 -2
- package/esm/LinearGenomeView/components/useRangeSelect.js +26 -20
- package/esm/LinearGenomeView/components/useWheelScroll.js +22 -12
- package/esm/LinearGenomeView/components/util.d.ts +2 -13
- package/esm/LinearGenomeView/components/util.js +12 -31
- package/esm/LinearGenomeView/index.d.ts +1 -1
- package/esm/LinearGenomeView/index.js +3 -3
- package/esm/LinearGenomeView/keyboardHandler.d.ts +2 -0
- package/esm/LinearGenomeView/keyboardHandler.js +29 -0
- package/esm/LinearGenomeView/menuItems.d.ts +7 -0
- package/esm/LinearGenomeView/menuItems.js +299 -0
- package/esm/LinearGenomeView/model.d.ts +92 -89
- package/esm/LinearGenomeView/model.js +166 -414
- package/esm/LinearGenomeView/svgExportUtil.d.ts +9 -0
- package/esm/LinearGenomeView/svgExportUtil.js +6 -0
- package/{dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts → esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts} +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +20 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +5 -5
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +4 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +24 -12
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +13 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +2 -2
- package/esm/LinearGenomeView/types.d.ts +5 -1
- package/esm/LinearGenomeView/util.d.ts +2 -2
- package/esm/LinearGenomeView/util.js +8 -6
- package/esm/index.d.ts +975 -94
- package/esm/index.js +37 -38
- package/esm/searchUtils.d.ts +1 -1
- package/esm/searchUtils.js +6 -4
- package/package.json +28 -33
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -72
- package/dist/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/dist/BaseLinearDisplay/components/Block.js +0 -50
- package/dist/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/dist/BaseLinearDisplay/components/BlockErrorMessage.js +0 -27
- package/dist/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
- package/dist/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -26
- package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/dist/BaseLinearDisplay/components/BlockMsg.js +0 -20
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -9
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -61
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -11
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -59
- package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +0 -25
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +0 -11
- package/dist/BaseLinearDisplay/components/Tooltip.js +0 -24
- package/dist/BaseLinearDisplay/index.d.ts +0 -8
- package/dist/BaseLinearDisplay/index.js +0 -20
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +0 -311
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -325
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -122
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +0 -35
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -33
- package/dist/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/dist/BaseLinearDisplay/models/configSchema.js +0 -35
- package/dist/BaseLinearDisplay/models/renderSvg.d.ts +0 -7
- package/dist/BaseLinearDisplay/models/renderSvg.js +0 -80
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -78
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -229
- package/dist/BaseLinearDisplay/models/util.d.ts +0 -22
- package/dist/BaseLinearDisplay/models/util.js +0 -45
- package/dist/BasicTrack/configSchema.d.ts +0 -80
- package/dist/BasicTrack/configSchema.js +0 -10
- package/dist/BasicTrack/index.d.ts +0 -2
- package/dist/BasicTrack/index.js +0 -18
- package/dist/FeatureTrack/configSchema.d.ts +0 -80
- package/dist/FeatureTrack/configSchema.js +0 -10
- package/dist/FeatureTrack/index.d.ts +0 -2
- package/dist/FeatureTrack/index.js +0 -19
- package/dist/LaunchLinearGenomeView/index.d.ts +0 -2
- package/dist/LaunchLinearGenomeView/index.js +0 -70
- package/dist/LinearBareDisplay/configSchema.d.ts +0 -32
- package/dist/LinearBareDisplay/configSchema.js +0 -13
- package/dist/LinearBareDisplay/index.d.ts +0 -4
- package/dist/LinearBareDisplay/index.js +0 -26
- package/dist/LinearBareDisplay/model.d.ts +0 -309
- package/dist/LinearBareDisplay/model.js +0 -38
- package/dist/LinearBasicDisplay/components/AddFiltersDialog.js +0 -61
- package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.js +0 -28
- package/dist/LinearBasicDisplay/configSchema.js +0 -13
- package/dist/LinearBasicDisplay/index.d.ts +0 -4
- package/dist/LinearBasicDisplay/index.js +0 -29
- package/dist/LinearBasicDisplay/model.d.ts +0 -346
- package/dist/LinearBasicDisplay/model.js +0 -192
- package/dist/LinearGenomeView/components/CenterLine.d.ts +0 -6
- package/dist/LinearGenomeView/components/CenterLine.js +0 -38
- package/dist/LinearGenomeView/components/Cytobands.d.ts +0 -9
- package/dist/LinearGenomeView/components/Cytobands.js +0 -89
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +0 -57
- package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +0 -6
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +0 -109
- package/dist/LinearGenomeView/components/Gridlines.d.ts +0 -7
- package/dist/LinearGenomeView/components/Gridlines.js +0 -70
- package/dist/LinearGenomeView/components/Header.d.ts +0 -5
- package/dist/LinearGenomeView/components/Header.js +0 -38
- package/dist/LinearGenomeView/components/HeaderPanControls.d.ts +0 -6
- package/dist/LinearGenomeView/components/HeaderPanControls.js +0 -27
- package/dist/LinearGenomeView/components/HeaderRegionWidth.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderRegionWidth.js +0 -21
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.js +0 -19
- package/dist/LinearGenomeView/components/HeaderZoomControls.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderZoomControls.js +0 -109
- package/dist/LinearGenomeView/components/Highlight.d.ts +0 -12
- package/dist/LinearGenomeView/components/Highlight.js +0 -95
- package/dist/LinearGenomeView/components/ImportForm.d.ts +0 -6
- package/dist/LinearGenomeView/components/ImportForm.js +0 -80
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -32
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +0 -5
- package/dist/LinearGenomeView/components/LinearGenomeView.js +0 -57
- package/dist/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +0 -5
- package/dist/LinearGenomeView/components/LinearGenomeViewContainer.js +0 -98
- package/dist/LinearGenomeView/components/MiniControls.d.ts +0 -5
- package/dist/LinearGenomeView/components/MiniControls.js +0 -36
- package/dist/LinearGenomeView/components/NoTracksActiveButton.d.ts +0 -5
- package/dist/LinearGenomeView/components/NoTracksActiveButton.js +0 -23
- package/dist/LinearGenomeView/components/OverviewHighlight.d.ts +0 -8
- package/dist/LinearGenomeView/components/OverviewHighlight.js +0 -50
- package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +0 -9
- package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -113
- package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +0 -10
- package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +0 -28
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +0 -7
- package/dist/LinearGenomeView/components/OverviewScalebar.js +0 -146
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +0 -8
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.js +0 -41
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +0 -10
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.js +0 -37
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -8
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -18
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -56
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -11
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -127
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -53
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +0 -6
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.js +0 -30
- package/dist/LinearGenomeView/components/Rubberband.d.ts +0 -7
- package/dist/LinearGenomeView/components/Rubberband.js +0 -35
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/dist/LinearGenomeView/components/RubberbandSpan.js +0 -39
- package/dist/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/dist/LinearGenomeView/components/RubberbandTooltip.js +0 -20
- package/dist/LinearGenomeView/components/Scalebar.d.ts +0 -10
- package/dist/LinearGenomeView/components/Scalebar.js +0 -40
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.js +0 -29
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -38
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.js +0 -46
- package/dist/LinearGenomeView/components/SearchBox.d.ts +0 -6
- package/dist/LinearGenomeView/components/SearchBox.js +0 -88
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -9
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +0 -15
- package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +0 -8
- package/dist/LinearGenomeView/components/SearchResultsTable.js +0 -74
- package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +0 -8
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js +0 -67
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackContainer.js +0 -51
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +0 -7
- package/dist/LinearGenomeView/components/TrackLabel.js +0 -49
- package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +0 -31
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.js +0 -32
- package/dist/LinearGenomeView/components/TrackLabelMenu.d.ts +0 -5
- package/dist/LinearGenomeView/components/TrackLabelMenu.js +0 -93
- package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +0 -9
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +0 -50
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +0 -7
- package/dist/LinearGenomeView/components/TracksContainer.js +0 -84
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +0 -7
- package/dist/LinearGenomeView/components/VerticalGuide.js +0 -31
- package/dist/LinearGenomeView/components/fetchSequence.d.ts +0 -4
- package/dist/LinearGenomeView/components/fetchSequence.js +0 -29
- package/dist/LinearGenomeView/components/useRangeSelect.d.ts +0 -59
- package/dist/LinearGenomeView/components/useRangeSelect.js +0 -131
- package/dist/LinearGenomeView/components/useSideScroll.d.ts +0 -6
- package/dist/LinearGenomeView/components/useSideScroll.js +0 -60
- package/dist/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/dist/LinearGenomeView/components/useWheelScroll.js +0 -62
- package/dist/LinearGenomeView/components/util.d.ts +0 -25
- package/dist/LinearGenomeView/components/util.js +0 -49
- package/dist/LinearGenomeView/consts.d.ts +0 -7
- package/dist/LinearGenomeView/consts.js +0 -10
- package/dist/LinearGenomeView/index.d.ts +0 -3
- package/dist/LinearGenomeView/index.js +0 -53
- package/dist/LinearGenomeView/model.d.ts +0 -268
- package/dist/LinearGenomeView/model.js +0 -1109
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +0 -10
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +0 -47
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +0 -6
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -42
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -8
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +0 -39
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +0 -17
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -14
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +0 -21
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +0 -32
- package/dist/LinearGenomeView/svgcomponents/util.d.ts +0 -8
- package/dist/LinearGenomeView/svgcomponents/util.js +0 -8
- package/dist/LinearGenomeView/types.d.ts +0 -43
- package/dist/LinearGenomeView/types.js +0 -2
- package/dist/LinearGenomeView/util.d.ts +0 -26
- package/dist/LinearGenomeView/util.js +0 -138
- package/dist/index.d.ts +0 -353
- package/dist/index.js +0 -120
- package/dist/searchUtils.d.ts +0 -26
- package/dist/searchUtils.js +0 -80
- package/esm/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -24
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +0 -311
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -286
- package/esm/LinearBasicDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -36
- /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/AddFiltersDialog.d.ts +0 -0
- /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/SetMaxHeightDialog.d.ts +0 -0
|
@@ -2,37 +2,25 @@ import { lazy } from 'react';
|
|
|
2
2
|
import { getConf } from '@jbrowse/core/configuration';
|
|
3
3
|
import { BaseViewModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
4
4
|
import { VIEW_HEADER_HEIGHT } from '@jbrowse/core/ui';
|
|
5
|
-
import {
|
|
6
|
-
import { assembleLocString, clamp, findLast, getSession, isSessionModelWithWidgets, isSessionWithAddTracks, localStorageGetBoolean, localStorageGetItem, localStorageSetItem, measureText, springAnimate, sum, } from '@jbrowse/core/util';
|
|
5
|
+
import { assembleLocString, clamp, findLast, getBpDisplayStr, getSession, isSessionModelWithWidgets, localStorageGetBoolean, localStorageGetItem, measureText, springAnimate, sum, } from '@jbrowse/core/util';
|
|
7
6
|
import { bpToPx, moveTo, pxToBp } from '@jbrowse/core/util/Base1DUtils';
|
|
8
7
|
import Base1DView from '@jbrowse/core/util/Base1DViewModel';
|
|
9
8
|
import calculateDynamicBlocks from '@jbrowse/core/util/calculateDynamicBlocks';
|
|
10
9
|
import calculateStaticBlocks from '@jbrowse/core/util/calculateStaticBlocks';
|
|
11
|
-
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
10
|
+
import { getParentRenderProps, hideTrackGeneric, showTrackGeneric, toggleTrackGeneric, } from '@jbrowse/core/util/tracks';
|
|
12
11
|
import { ElementId } from '@jbrowse/core/util/types/mst';
|
|
12
|
+
import { cast, getParent, getSnapshot, types } from '@jbrowse/mobx-state-tree';
|
|
13
13
|
import { isSessionWithMultipleViews } from '@jbrowse/product-core';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
24
|
-
import { autorun, transaction, when } from 'mobx';
|
|
25
|
-
import { addDisposer, cast, getParent, getRoot, getSnapshot, resolveIdentifier, types, } from 'mobx-state-tree';
|
|
26
|
-
import Header from './components/Header';
|
|
27
|
-
import { calculateVisibleLocStrings, generateLocations, parseLocStrings, } from './util';
|
|
28
|
-
import { handleSelectedRegion } from '../searchUtils';
|
|
29
|
-
import MiniControls from './components/MiniControls';
|
|
30
|
-
import { HEADER_BAR_HEIGHT, HEADER_OVERVIEW_HEIGHT, INTER_REGION_PADDING_WIDTH, RESIZE_HANDLE_HEIGHT, SCALE_BAR_HEIGHT, } from './consts';
|
|
31
|
-
const ReturnToImportFormDialog = lazy(() => import('@jbrowse/core/ui/ReturnToImportFormDialog'));
|
|
32
|
-
const SequenceSearchDialog = lazy(() => import('./components/SequenceSearchDialog'));
|
|
33
|
-
const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'));
|
|
34
|
-
const GetSequenceDialog = lazy(() => import('./components/GetSequenceDialog'));
|
|
35
|
-
const SearchResultsDialog = lazy(() => import('./components/SearchResultsDialog'));
|
|
14
|
+
import { when } from 'mobx';
|
|
15
|
+
import { handleSelectedRegion } from "../searchUtils.js";
|
|
16
|
+
import { doAfterAttach } from "./afterAttach.js";
|
|
17
|
+
import Header from "./components/Header.js";
|
|
18
|
+
import MiniControls from "./components/MiniControls.js";
|
|
19
|
+
import { HEADER_BAR_HEIGHT, HEADER_OVERVIEW_HEIGHT, INTER_REGION_PADDING_WIDTH, RESIZE_HANDLE_HEIGHT, SCALE_BAR_HEIGHT, } from "./consts.js";
|
|
20
|
+
import { setupKeyboardHandler } from "./keyboardHandler.js";
|
|
21
|
+
import { buildMenuItems, buildRubberBandMenuItems, buildRubberbandClickMenuItems, rewriteOnClicks, } from "./menuItems.js";
|
|
22
|
+
import { calculateVisibleLocStrings, generateLocations, parseLocStrings, } from "./util.js";
|
|
23
|
+
const SearchResultsDialog = lazy(() => import("./components/SearchResultsDialog.js"));
|
|
36
24
|
export function stateModelFactory(pluginManager) {
|
|
37
25
|
return types
|
|
38
26
|
.compose('LinearGenomeView', BaseViewModel, types.model({
|
|
@@ -59,8 +47,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
59
47
|
volatileWidth: undefined,
|
|
60
48
|
minimumBlockWidth: 3,
|
|
61
49
|
draggingTrackId: undefined,
|
|
50
|
+
lastTrackDragY: undefined,
|
|
62
51
|
volatileError: undefined,
|
|
63
|
-
afterDisplayedRegionsSetCallbacks: [],
|
|
64
52
|
scaleFactor: 1,
|
|
65
53
|
trackRefs: {},
|
|
66
54
|
coarseDynamicBlocks: [],
|
|
@@ -92,21 +80,14 @@ export function stateModelFactory(pluginManager) {
|
|
|
92
80
|
return INTER_REGION_PADDING_WIDTH;
|
|
93
81
|
},
|
|
94
82
|
get assemblyNames() {
|
|
95
|
-
return [
|
|
96
|
-
...new Set(self.displayedRegions.map(region => region.assemblyName)),
|
|
97
|
-
];
|
|
83
|
+
return [...new Set(self.displayedRegions.map(r => r.assemblyName))];
|
|
98
84
|
},
|
|
99
85
|
get assemblyDisplayNames() {
|
|
100
86
|
const { assemblyManager } = getSession(self);
|
|
101
|
-
return this.assemblyNames.map(
|
|
102
|
-
var _a;
|
|
103
|
-
const assembly = assemblyManager.get(assemblyName);
|
|
104
|
-
return (_a = assembly === null || assembly === void 0 ? void 0 : assembly.displayName) !== null && _a !== void 0 ? _a : assemblyName;
|
|
105
|
-
});
|
|
87
|
+
return this.assemblyNames.map(a => assemblyManager.get(a)?.displayName ?? a);
|
|
106
88
|
},
|
|
107
89
|
get isTopLevelView() {
|
|
108
|
-
|
|
109
|
-
return session.views.some(r => r.id === self.id);
|
|
90
|
+
return getSession(self).views.some(r => r.id === self.id);
|
|
110
91
|
},
|
|
111
92
|
get stickyViewHeaders() {
|
|
112
93
|
const session = getSession(self);
|
|
@@ -132,7 +113,7 @@ export function stateModelFactory(pluginManager) {
|
|
|
132
113
|
},
|
|
133
114
|
}))
|
|
134
115
|
.views(self => ({
|
|
135
|
-
|
|
116
|
+
scalebarDisplayPrefix() {
|
|
136
117
|
return getParent(self, 2).type === 'LinearSyntenyView'
|
|
137
118
|
? self.assemblyDisplayNames[0]
|
|
138
119
|
: '';
|
|
@@ -154,21 +135,41 @@ export function stateModelFactory(pluginManager) {
|
|
|
154
135
|
get assemblyErrors() {
|
|
155
136
|
const { assemblyManager } = getSession(self);
|
|
156
137
|
return self.assemblyNames
|
|
157
|
-
.map(a =>
|
|
138
|
+
.map(a => assemblyManager.get(a)?.error)
|
|
158
139
|
.filter(f => !!f)
|
|
159
140
|
.join(', ');
|
|
160
141
|
},
|
|
161
142
|
get assembliesInitialized() {
|
|
162
143
|
const { assemblyManager } = getSession(self);
|
|
163
|
-
return self.assemblyNames.every(a =>
|
|
144
|
+
return self.assemblyNames.every(a => assemblyManager.get(a)?.initialized);
|
|
164
145
|
},
|
|
165
146
|
get initialized() {
|
|
166
|
-
|
|
147
|
+
if (self.volatileWidth === undefined) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
if (self.init) {
|
|
151
|
+
const { assemblyManager } = getSession(self);
|
|
152
|
+
const asm = assemblyManager.get(self.init.assembly);
|
|
153
|
+
return !!(asm?.initialized && asm.regions);
|
|
154
|
+
}
|
|
155
|
+
return this.assembliesInitialized;
|
|
167
156
|
},
|
|
168
157
|
get hasDisplayedRegions() {
|
|
169
158
|
return self.displayedRegions.length > 0;
|
|
170
159
|
},
|
|
171
|
-
get
|
|
160
|
+
get loadingMessage() {
|
|
161
|
+
return this.showLoading ? 'Loading' : undefined;
|
|
162
|
+
},
|
|
163
|
+
get hasSomethingToShow() {
|
|
164
|
+
return this.hasDisplayedRegions || !!self.init;
|
|
165
|
+
},
|
|
166
|
+
get showLoading() {
|
|
167
|
+
return !this.initialized && !this.error && this.hasSomethingToShow;
|
|
168
|
+
},
|
|
169
|
+
get showImportForm() {
|
|
170
|
+
return !this.hasSomethingToShow || !!this.error;
|
|
171
|
+
},
|
|
172
|
+
get scalebarHeight() {
|
|
172
173
|
return SCALE_BAR_HEIGHT + RESIZE_HANDLE_HEIGHT;
|
|
173
174
|
},
|
|
174
175
|
get headerHeight() {
|
|
@@ -191,7 +192,7 @@ export function stateModelFactory(pluginManager) {
|
|
|
191
192
|
get height() {
|
|
192
193
|
return (this.trackHeightsWithResizeHandles +
|
|
193
194
|
this.headerHeight +
|
|
194
|
-
this.
|
|
195
|
+
this.scalebarHeight);
|
|
195
196
|
},
|
|
196
197
|
get totalBp() {
|
|
197
198
|
return sum(self.displayedRegions.map(r => r.end - r.start));
|
|
@@ -203,7 +204,26 @@ export function stateModelFactory(pluginManager) {
|
|
|
203
204
|
return 1 / 50;
|
|
204
205
|
},
|
|
205
206
|
get error() {
|
|
206
|
-
|
|
207
|
+
if (self.volatileError) {
|
|
208
|
+
return self.volatileError;
|
|
209
|
+
}
|
|
210
|
+
if (this.assemblyErrors) {
|
|
211
|
+
return this.assemblyErrors;
|
|
212
|
+
}
|
|
213
|
+
if (this.assembliesNotFound) {
|
|
214
|
+
return this.assembliesNotFound;
|
|
215
|
+
}
|
|
216
|
+
if (self.init) {
|
|
217
|
+
const { assemblyManager } = getSession(self);
|
|
218
|
+
const asm = assemblyManager.get(self.init.assembly);
|
|
219
|
+
if (asm?.error) {
|
|
220
|
+
return asm.error;
|
|
221
|
+
}
|
|
222
|
+
if (!asm) {
|
|
223
|
+
return `Assembly ${self.init.assembly} not found`;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return undefined;
|
|
207
227
|
},
|
|
208
228
|
get maxOffset() {
|
|
209
229
|
const leftPadding = 10;
|
|
@@ -230,36 +250,26 @@ export function stateModelFactory(pluginManager) {
|
|
|
230
250
|
tracks: self.tracks,
|
|
231
251
|
};
|
|
232
252
|
},
|
|
253
|
+
get trackMap() {
|
|
254
|
+
const map = new Map();
|
|
255
|
+
for (const track of self.tracks) {
|
|
256
|
+
map.set(track.configuration.trackId, track);
|
|
257
|
+
}
|
|
258
|
+
return map;
|
|
259
|
+
},
|
|
233
260
|
getTrack(id) {
|
|
234
|
-
return
|
|
261
|
+
return this.trackMap.get(id);
|
|
235
262
|
},
|
|
236
263
|
rankSearchResults(results) {
|
|
237
264
|
return results;
|
|
238
265
|
},
|
|
239
|
-
rewriteOnClicks(trackType, viewMenuActions) {
|
|
240
|
-
for (const action of viewMenuActions) {
|
|
241
|
-
if ('subMenu' in action) {
|
|
242
|
-
this.rewriteOnClicks(trackType, action.subMenu);
|
|
243
|
-
}
|
|
244
|
-
if ('onClick' in action) {
|
|
245
|
-
const holdOnClick = action.onClick;
|
|
246
|
-
action.onClick = (...args) => {
|
|
247
|
-
for (const track of self.tracks) {
|
|
248
|
-
if (track.type === trackType) {
|
|
249
|
-
holdOnClick.apply(track, [track, ...args]);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
266
|
get trackTypeActions() {
|
|
257
267
|
const allActions = new Map();
|
|
258
268
|
for (const track of self.tracks) {
|
|
259
269
|
const trackInMap = allActions.get(track.type);
|
|
260
270
|
if (!trackInMap) {
|
|
261
271
|
const viewMenuActions = structuredClone(track.viewMenuActions);
|
|
262
|
-
|
|
272
|
+
rewriteOnClicks(self, track.type, viewMenuActions);
|
|
263
273
|
allActions.set(track.type, viewMenuActions);
|
|
264
274
|
}
|
|
265
275
|
}
|
|
@@ -319,8 +329,9 @@ export function stateModelFactory(pluginManager) {
|
|
|
319
329
|
return oldBpPerPx;
|
|
320
330
|
}
|
|
321
331
|
self.bpPerPx = newBpPerPx;
|
|
322
|
-
|
|
323
|
-
(centerAtOffset ? self.width / 2 : offset))
|
|
332
|
+
const newOffsetPx = Math.round(((self.offsetPx + offset) * oldBpPerPx) / newBpPerPx -
|
|
333
|
+
(centerAtOffset ? self.width / 2 : offset));
|
|
334
|
+
this.scrollTo(newOffsetPx);
|
|
324
335
|
return newBpPerPx;
|
|
325
336
|
},
|
|
326
337
|
setOffsets(left, right) {
|
|
@@ -350,58 +361,15 @@ export function stateModelFactory(pluginManager) {
|
|
|
350
361
|
this.scrollTo(self.totalBp / self.bpPerPx - self.offsetPx - self.width);
|
|
351
362
|
},
|
|
352
363
|
showTrack(trackId, initialSnapshot = {}, displayInitialSnapshot = {}) {
|
|
353
|
-
|
|
354
|
-
const conf = resolveIdentifier(schema, getRoot(self), trackId);
|
|
355
|
-
if (!conf) {
|
|
356
|
-
throw new Error(`Could not resolve identifier "${trackId}"`);
|
|
357
|
-
}
|
|
358
|
-
const trackType = pluginManager.getTrackType(conf === null || conf === void 0 ? void 0 : conf.type);
|
|
359
|
-
if (!trackType) {
|
|
360
|
-
throw new Error(`Unknown track type ${conf.type}`);
|
|
361
|
-
}
|
|
362
|
-
const viewType = pluginManager.getViewType(self.type);
|
|
363
|
-
const supportedDisplays = new Set(viewType.displayTypes.map(d => d.name));
|
|
364
|
-
const displayConf = conf.displays.find((d) => supportedDisplays.has(d.type));
|
|
365
|
-
if (!displayConf) {
|
|
366
|
-
throw new Error(`Could not find a compatible display for view type ${self.type}`);
|
|
367
|
-
}
|
|
368
|
-
const t = self.tracks.filter(t => t.configuration === conf);
|
|
369
|
-
if (t.length === 0) {
|
|
370
|
-
const track = trackType.stateModel.create({
|
|
371
|
-
...initialSnapshot,
|
|
372
|
-
type: conf.type,
|
|
373
|
-
configuration: conf,
|
|
374
|
-
displays: [
|
|
375
|
-
{
|
|
376
|
-
type: displayConf.type,
|
|
377
|
-
configuration: displayConf,
|
|
378
|
-
...displayInitialSnapshot,
|
|
379
|
-
},
|
|
380
|
-
],
|
|
381
|
-
});
|
|
382
|
-
self.tracks.push(track);
|
|
383
|
-
return track;
|
|
384
|
-
}
|
|
385
|
-
return t[0];
|
|
364
|
+
return showTrackGeneric(self, trackId, initialSnapshot, displayInitialSnapshot);
|
|
386
365
|
},
|
|
387
366
|
hideTrack(trackId) {
|
|
388
|
-
|
|
389
|
-
const conf = resolveIdentifier(schema, getRoot(self), trackId);
|
|
390
|
-
const tracks = self.tracks.filter(t => t.configuration === conf);
|
|
391
|
-
transaction(() => {
|
|
392
|
-
for (const track of tracks) {
|
|
393
|
-
self.tracks.remove(track);
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
return tracks.length;
|
|
367
|
+
return hideTrackGeneric(self, trackId);
|
|
397
368
|
},
|
|
398
369
|
}))
|
|
399
370
|
.actions(self => ({
|
|
400
371
|
moveTrackDown(id) {
|
|
401
372
|
const idx = self.tracks.findIndex(v => v.id === id);
|
|
402
|
-
if (idx === -1) {
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
373
|
if (idx !== -1 && idx < self.tracks.length - 1) {
|
|
406
374
|
self.tracks.splice(idx, 2, self.tracks[idx + 1], self.tracks[idx]);
|
|
407
375
|
}
|
|
@@ -413,18 +381,16 @@ export function stateModelFactory(pluginManager) {
|
|
|
413
381
|
}
|
|
414
382
|
},
|
|
415
383
|
moveTrackToTop(id) {
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
self.tracks[
|
|
419
|
-
|
|
420
|
-
]);
|
|
384
|
+
const track = self.tracks.find(track => track.id === id);
|
|
385
|
+
if (track) {
|
|
386
|
+
self.tracks = cast([track, ...self.tracks.filter(t => t.id !== id)]);
|
|
387
|
+
}
|
|
421
388
|
},
|
|
422
389
|
moveTrackToBottom(id) {
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
...self.tracks.filter(
|
|
426
|
-
|
|
427
|
-
]);
|
|
390
|
+
const track = self.tracks.find(track => track.id === id);
|
|
391
|
+
if (track) {
|
|
392
|
+
self.tracks = cast([...self.tracks.filter(t => t.id !== id), track]);
|
|
393
|
+
}
|
|
428
394
|
},
|
|
429
395
|
moveTrack(movingId, targetId) {
|
|
430
396
|
const oldIndex = self.tracks.findIndex(track => track.id === movingId);
|
|
@@ -440,15 +406,9 @@ export function stateModelFactory(pluginManager) {
|
|
|
440
406
|
self.tracks = cast(tracks);
|
|
441
407
|
},
|
|
442
408
|
toggleTrack(trackId) {
|
|
443
|
-
|
|
444
|
-
if (!hiddenCount) {
|
|
445
|
-
self.showTrack(trackId);
|
|
446
|
-
return true;
|
|
447
|
-
}
|
|
448
|
-
return false;
|
|
409
|
+
toggleTrackGeneric(self, trackId);
|
|
449
410
|
},
|
|
450
411
|
setTrackLabels(setting) {
|
|
451
|
-
localStorage.setItem('lgv-trackLabels', setting);
|
|
452
412
|
self.trackLabels = setting;
|
|
453
413
|
},
|
|
454
414
|
setShowCenterLine(b) {
|
|
@@ -478,26 +438,27 @@ export function stateModelFactory(pluginManager) {
|
|
|
478
438
|
simView.setVolatileWidth(self.width);
|
|
479
439
|
simView.moveTo(leftOffset, rightOffset);
|
|
480
440
|
return simView.dynamicBlocks.contentBlocks.map(region => ({
|
|
481
|
-
|
|
441
|
+
assemblyName: region.assemblyName,
|
|
442
|
+
refName: region.refName,
|
|
482
443
|
start: Math.floor(region.start),
|
|
483
444
|
end: Math.ceil(region.end),
|
|
484
445
|
}));
|
|
485
446
|
},
|
|
486
|
-
afterDisplayedRegionsSet(cb) {
|
|
487
|
-
self.afterDisplayedRegionsSetCallbacks.push(cb);
|
|
488
|
-
},
|
|
489
447
|
horizontalScroll(distance) {
|
|
490
448
|
const oldOffsetPx = self.offsetPx;
|
|
491
449
|
const newOffsetPx = self.scrollTo(self.offsetPx + distance);
|
|
492
450
|
return newOffsetPx - oldOffsetPx;
|
|
493
451
|
},
|
|
494
452
|
center() {
|
|
495
|
-
const
|
|
496
|
-
const
|
|
497
|
-
self.
|
|
453
|
+
const numPaddings = Math.max(0, self.displayedRegions.length - 1);
|
|
454
|
+
const totalPaddingPx = numPaddings * self.interRegionPaddingWidth;
|
|
455
|
+
const totalContentPx = self.totalBp / self.bpPerPx + totalPaddingPx;
|
|
456
|
+
const centerPx = totalContentPx / 2;
|
|
457
|
+
const targetOffsetPx = Math.round(centerPx - self.width / 2);
|
|
458
|
+
self.scrollTo(targetOffsetPx);
|
|
498
459
|
},
|
|
499
460
|
showAllRegions() {
|
|
500
|
-
self.
|
|
461
|
+
self.bpPerPx = clamp(self.maxBpPerPx, self.minBpPerPx, self.maxBpPerPx);
|
|
501
462
|
this.center();
|
|
502
463
|
},
|
|
503
464
|
showAllRegionsInAssembly(assemblyName) {
|
|
@@ -512,18 +473,22 @@ export function stateModelFactory(pluginManager) {
|
|
|
512
473
|
;
|
|
513
474
|
[assemblyName] = [...names];
|
|
514
475
|
}
|
|
515
|
-
const
|
|
516
|
-
if (
|
|
517
|
-
|
|
518
|
-
if (regions) {
|
|
519
|
-
this.setDisplayedRegions(regions);
|
|
520
|
-
self.zoomTo(self.maxBpPerPx);
|
|
521
|
-
this.center();
|
|
522
|
-
}
|
|
476
|
+
const regions = assemblyManager.get(assemblyName)?.regions;
|
|
477
|
+
if (!regions) {
|
|
478
|
+
return;
|
|
523
479
|
}
|
|
480
|
+
this.setDisplayedRegions(regions);
|
|
481
|
+
self.zoomTo(self.maxBpPerPx);
|
|
482
|
+
this.center();
|
|
524
483
|
},
|
|
525
484
|
setDraggingTrackId(idx) {
|
|
526
485
|
self.draggingTrackId = idx;
|
|
486
|
+
if (idx === undefined) {
|
|
487
|
+
self.lastTrackDragY = undefined;
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
setLastTrackDragY(y) {
|
|
491
|
+
self.lastTrackDragY = y;
|
|
527
492
|
},
|
|
528
493
|
setScaleFactor(factor) {
|
|
529
494
|
self.scaleFactor = factor;
|
|
@@ -538,10 +503,10 @@ export function stateModelFactory(pluginManager) {
|
|
|
538
503
|
self.init = arg;
|
|
539
504
|
},
|
|
540
505
|
async exportSvg(opts = {}) {
|
|
541
|
-
const { renderToSvg } = await import(
|
|
506
|
+
const { renderToSvg } = await import("./svgcomponents/SVGLinearGenomeView.js");
|
|
542
507
|
const html = await renderToSvg(self, opts);
|
|
543
|
-
const
|
|
544
|
-
saveAs(
|
|
508
|
+
const { saveAs } = await import('file-saver-es');
|
|
509
|
+
saveAs(new Blob([html], { type: 'image/svg+xml' }), opts.filename || 'image.svg');
|
|
545
510
|
},
|
|
546
511
|
}))
|
|
547
512
|
.actions(self => {
|
|
@@ -557,6 +522,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
557
522
|
.actions(self => {
|
|
558
523
|
let cancelLastAnimation = () => { };
|
|
559
524
|
function zoom(targetBpPerPx) {
|
|
525
|
+
cancelLastAnimation();
|
|
526
|
+
self.setScaleFactor(1);
|
|
560
527
|
self.zoomTo(self.bpPerPx);
|
|
561
528
|
if ((targetBpPerPx < self.bpPerPx && self.bpPerPx === self.minBpPerPx) ||
|
|
562
529
|
(targetBpPerPx > self.bpPerPx && self.bpPerPx === self.maxBpPerPx)) {
|
|
@@ -567,7 +534,6 @@ export function stateModelFactory(pluginManager) {
|
|
|
567
534
|
self.zoomTo(targetBpPerPx);
|
|
568
535
|
self.setScaleFactor(1);
|
|
569
536
|
});
|
|
570
|
-
cancelLastAnimation();
|
|
571
537
|
cancelLastAnimation = cancelAnimation;
|
|
572
538
|
animate();
|
|
573
539
|
}
|
|
@@ -582,207 +548,35 @@ export function stateModelFactory(pluginManager) {
|
|
|
582
548
|
},
|
|
583
549
|
get anyCytobandsExist() {
|
|
584
550
|
const { assemblyManager } = getSession(self);
|
|
585
|
-
return self.assemblyNames.some(a =>
|
|
551
|
+
return self.assemblyNames.some(a => assemblyManager.get(a)?.cytobands?.length);
|
|
586
552
|
},
|
|
587
553
|
get cytobandOffset() {
|
|
588
|
-
var _a;
|
|
589
554
|
return this.showCytobands
|
|
590
|
-
? measureText(
|
|
555
|
+
? measureText(self.displayedRegions[0]?.refName || '', 12) + 15
|
|
591
556
|
: 0;
|
|
592
557
|
},
|
|
593
558
|
}))
|
|
594
559
|
.views(self => ({
|
|
595
560
|
menuItems() {
|
|
596
|
-
|
|
597
|
-
const session = getSession(self);
|
|
598
|
-
const menuItems = [
|
|
599
|
-
{
|
|
600
|
-
label: 'Return to import form',
|
|
601
|
-
onClick: () => {
|
|
602
|
-
getSession(self).queueDialog(handleClose => [
|
|
603
|
-
ReturnToImportFormDialog,
|
|
604
|
-
{ model: self, handleClose },
|
|
605
|
-
]);
|
|
606
|
-
},
|
|
607
|
-
icon: FolderOpenIcon,
|
|
608
|
-
},
|
|
609
|
-
...(isSessionWithAddTracks(session)
|
|
610
|
-
? [
|
|
611
|
-
{
|
|
612
|
-
label: 'Sequence search',
|
|
613
|
-
icon: SearchIcon,
|
|
614
|
-
onClick: () => {
|
|
615
|
-
getSession(self).queueDialog(handleClose => [
|
|
616
|
-
SequenceSearchDialog,
|
|
617
|
-
{
|
|
618
|
-
model: self,
|
|
619
|
-
handleClose,
|
|
620
|
-
},
|
|
621
|
-
]);
|
|
622
|
-
},
|
|
623
|
-
},
|
|
624
|
-
]
|
|
625
|
-
: []),
|
|
626
|
-
{
|
|
627
|
-
label: 'Export SVG',
|
|
628
|
-
icon: PhotoCameraIcon,
|
|
629
|
-
onClick: () => {
|
|
630
|
-
getSession(self).queueDialog(handleClose => [
|
|
631
|
-
ExportSvgDialog,
|
|
632
|
-
{
|
|
633
|
-
model: self,
|
|
634
|
-
handleClose,
|
|
635
|
-
},
|
|
636
|
-
]);
|
|
637
|
-
},
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
label: 'Open track selector',
|
|
641
|
-
onClick: self.activateTrackSelector,
|
|
642
|
-
icon: TrackSelectorIcon,
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
label: 'Horizontally flip',
|
|
646
|
-
icon: SyncAltIcon,
|
|
647
|
-
onClick: self.horizontallyFlip,
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
label: 'Color by CDS',
|
|
651
|
-
type: 'checkbox',
|
|
652
|
-
checked: self.colorByCDS,
|
|
653
|
-
icon: PaletteIcon,
|
|
654
|
-
onClick: () => {
|
|
655
|
-
self.setColorByCDS(!self.colorByCDS);
|
|
656
|
-
},
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
label: 'Show...',
|
|
660
|
-
icon: VisibilityIcon,
|
|
661
|
-
subMenu: [
|
|
662
|
-
{
|
|
663
|
-
label: 'Show all regions in assembly',
|
|
664
|
-
onClick: self.showAllRegionsInAssembly,
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
label: 'Show center line',
|
|
668
|
-
type: 'checkbox',
|
|
669
|
-
checked: self.showCenterLine,
|
|
670
|
-
onClick: () => {
|
|
671
|
-
self.setShowCenterLine(!self.showCenterLine);
|
|
672
|
-
},
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
label: 'Show header',
|
|
676
|
-
type: 'checkbox',
|
|
677
|
-
checked: !self.hideHeader,
|
|
678
|
-
onClick: () => {
|
|
679
|
-
self.setHideHeader(!self.hideHeader);
|
|
680
|
-
},
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
label: 'Show track outlines',
|
|
684
|
-
type: 'checkbox',
|
|
685
|
-
checked: self.showTrackOutlines,
|
|
686
|
-
onClick: () => {
|
|
687
|
-
self.setShowTrackOutlines(!self.showTrackOutlines);
|
|
688
|
-
},
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
label: 'Show header overview',
|
|
692
|
-
type: 'checkbox',
|
|
693
|
-
checked: !self.hideHeaderOverview,
|
|
694
|
-
onClick: () => {
|
|
695
|
-
self.setHideHeaderOverview(!self.hideHeaderOverview);
|
|
696
|
-
},
|
|
697
|
-
disabled: self.hideHeader,
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
label: 'Show no tracks active button',
|
|
701
|
-
type: 'checkbox',
|
|
702
|
-
checked: !self.hideNoTracksActive,
|
|
703
|
-
onClick: () => {
|
|
704
|
-
self.setHideNoTracksActive(!self.hideNoTracksActive);
|
|
705
|
-
},
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
label: 'Show guidelines',
|
|
709
|
-
type: 'checkbox',
|
|
710
|
-
checked: self.showGridlines,
|
|
711
|
-
onClick: () => {
|
|
712
|
-
self.setShowGridlines(!self.showGridlines);
|
|
713
|
-
},
|
|
714
|
-
},
|
|
715
|
-
...(canShowCytobands
|
|
716
|
-
? [
|
|
717
|
-
{
|
|
718
|
-
label: 'Show ideogram',
|
|
719
|
-
type: 'checkbox',
|
|
720
|
-
checked: self.showCytobands,
|
|
721
|
-
onClick: () => {
|
|
722
|
-
self.setShowCytobands(!showCytobands);
|
|
723
|
-
},
|
|
724
|
-
},
|
|
725
|
-
]
|
|
726
|
-
: []),
|
|
727
|
-
],
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
label: 'Track labels',
|
|
731
|
-
icon: LabelIcon,
|
|
732
|
-
subMenu: [
|
|
733
|
-
{
|
|
734
|
-
label: 'Overlapping',
|
|
735
|
-
icon: VisibilityIcon,
|
|
736
|
-
type: 'radio',
|
|
737
|
-
checked: self.trackLabelsSetting === 'overlapping',
|
|
738
|
-
onClick: () => {
|
|
739
|
-
self.setTrackLabels('overlapping');
|
|
740
|
-
},
|
|
741
|
-
},
|
|
742
|
-
{
|
|
743
|
-
label: 'Offset',
|
|
744
|
-
icon: VisibilityIcon,
|
|
745
|
-
type: 'radio',
|
|
746
|
-
checked: self.trackLabelsSetting === 'offset',
|
|
747
|
-
onClick: () => {
|
|
748
|
-
self.setTrackLabels('offset');
|
|
749
|
-
},
|
|
750
|
-
},
|
|
751
|
-
{
|
|
752
|
-
label: 'Hidden',
|
|
753
|
-
icon: VisibilityIcon,
|
|
754
|
-
type: 'radio',
|
|
755
|
-
checked: self.trackLabelsSetting === 'hidden',
|
|
756
|
-
onClick: () => {
|
|
757
|
-
self.setTrackLabels('hidden');
|
|
758
|
-
},
|
|
759
|
-
},
|
|
760
|
-
],
|
|
761
|
-
},
|
|
762
|
-
];
|
|
763
|
-
for (const [key, value] of self.trackTypeActions.entries()) {
|
|
764
|
-
if (value.length) {
|
|
765
|
-
menuItems.push({ type: 'divider' }, { type: 'subHeader', label: key });
|
|
766
|
-
for (const action of value) {
|
|
767
|
-
menuItems.push(action);
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
return menuItems;
|
|
561
|
+
return buildMenuItems(self);
|
|
772
562
|
},
|
|
773
563
|
}))
|
|
774
564
|
.views(self => {
|
|
775
565
|
let currentlyCalculatedStaticBlocks;
|
|
776
|
-
let
|
|
566
|
+
let currentBlockKeys;
|
|
777
567
|
return {
|
|
778
568
|
get staticBlocks() {
|
|
779
|
-
const
|
|
780
|
-
const
|
|
781
|
-
if (
|
|
782
|
-
|
|
783
|
-
|
|
569
|
+
const newBlocks = calculateStaticBlocks(self);
|
|
570
|
+
const newKeys = newBlocks.blocks.map(b => b.key).join(',');
|
|
571
|
+
if (currentlyCalculatedStaticBlocks === undefined ||
|
|
572
|
+
currentBlockKeys !== newKeys) {
|
|
573
|
+
currentlyCalculatedStaticBlocks = newBlocks;
|
|
574
|
+
currentBlockKeys = newKeys;
|
|
575
|
+
return currentlyCalculatedStaticBlocks;
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
return currentlyCalculatedStaticBlocks;
|
|
784
579
|
}
|
|
785
|
-
return currentlyCalculatedStaticBlocks;
|
|
786
580
|
},
|
|
787
581
|
get dynamicBlocks() {
|
|
788
582
|
return calculateDynamicBlocks(self);
|
|
@@ -800,6 +594,9 @@ export function stateModelFactory(pluginManager) {
|
|
|
800
594
|
get coarseVisibleLocStrings() {
|
|
801
595
|
return calculateVisibleLocStrings(self.coarseDynamicBlocks);
|
|
802
596
|
},
|
|
597
|
+
get coarseTotalBpDisplayStr() {
|
|
598
|
+
return getBpDisplayStr(self.coarseTotalBp);
|
|
599
|
+
},
|
|
803
600
|
};
|
|
804
601
|
})
|
|
805
602
|
.actions(self => ({
|
|
@@ -851,8 +648,8 @@ export function stateModelFactory(pluginManager) {
|
|
|
851
648
|
]);
|
|
852
649
|
this.navTo({
|
|
853
650
|
...location,
|
|
854
|
-
start: clamp(start
|
|
855
|
-
end: clamp(end
|
|
651
|
+
start: clamp(start ?? 0, 0, parentRegion.end),
|
|
652
|
+
end: clamp(end ?? parentRegion.end, 0, parentRegion.end),
|
|
856
653
|
});
|
|
857
654
|
}
|
|
858
655
|
else {
|
|
@@ -884,11 +681,11 @@ export function stateModelFactory(pluginManager) {
|
|
|
884
681
|
const defaultAssemblyName = self.assemblyNames[0];
|
|
885
682
|
const { assemblyManager } = getSession(self);
|
|
886
683
|
const firstAssembly = assemblyManager.get(firstLocation.assemblyName || defaultAssemblyName);
|
|
887
|
-
const firstRefName =
|
|
684
|
+
const firstRefName = firstAssembly?.getCanonicalRefName(firstLocation.refName) ||
|
|
888
685
|
firstLocation.refName;
|
|
889
686
|
const firstRegion = self.displayedRegions.find(r => r.refName === firstRefName);
|
|
890
687
|
const lastAssembly = assemblyManager.get(lastLocation.assemblyName || defaultAssemblyName);
|
|
891
|
-
const lastRefName =
|
|
688
|
+
const lastRefName = lastAssembly?.getCanonicalRefName(lastLocation.refName) ||
|
|
892
689
|
lastLocation.refName;
|
|
893
690
|
const lastRegion = findLast(self.displayedRegions, r => r.refName === lastRefName);
|
|
894
691
|
if (!firstRegion) {
|
|
@@ -937,25 +734,7 @@ export function stateModelFactory(pluginManager) {
|
|
|
937
734
|
}))
|
|
938
735
|
.views(self => ({
|
|
939
736
|
rubberBandMenuItems() {
|
|
940
|
-
return
|
|
941
|
-
{
|
|
942
|
-
label: 'Zoom to region',
|
|
943
|
-
icon: ZoomInIcon,
|
|
944
|
-
onClick: () => {
|
|
945
|
-
self.moveTo(self.leftOffset, self.rightOffset);
|
|
946
|
-
},
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
label: 'Get sequence',
|
|
950
|
-
icon: MenuOpenIcon,
|
|
951
|
-
onClick: () => {
|
|
952
|
-
getSession(self).queueDialog(handleClose => [
|
|
953
|
-
GetSequenceDialog,
|
|
954
|
-
{ model: self, handleClose },
|
|
955
|
-
]);
|
|
956
|
-
},
|
|
957
|
-
},
|
|
958
|
-
];
|
|
737
|
+
return buildRubberBandMenuItems(self);
|
|
959
738
|
},
|
|
960
739
|
bpToPx({ refName, coord, regionNumber, }) {
|
|
961
740
|
return bpToPx({ refName, coord, regionNumber, self });
|
|
@@ -978,62 +757,21 @@ export function stateModelFactory(pluginManager) {
|
|
|
978
757
|
? this.pxToBp(self.width / 2)
|
|
979
758
|
: undefined;
|
|
980
759
|
},
|
|
760
|
+
get visibleRegions() {
|
|
761
|
+
return self.dynamicBlocks.contentBlocks;
|
|
762
|
+
},
|
|
763
|
+
}))
|
|
764
|
+
.views(self => ({
|
|
765
|
+
rubberbandClickMenuItems(clickOffset) {
|
|
766
|
+
return buildRubberbandClickMenuItems(self, clickOffset);
|
|
767
|
+
},
|
|
981
768
|
}))
|
|
982
769
|
.actions(self => ({
|
|
983
770
|
afterCreate() {
|
|
984
|
-
|
|
985
|
-
const session = getSession(self);
|
|
986
|
-
if (session.focusedViewId === self.id && (e.ctrlKey || e.metaKey)) {
|
|
987
|
-
if (e.code === 'ArrowLeft') {
|
|
988
|
-
e.preventDefault();
|
|
989
|
-
self.slide(-0.9);
|
|
990
|
-
}
|
|
991
|
-
else if (e.code === 'ArrowRight') {
|
|
992
|
-
e.preventDefault();
|
|
993
|
-
self.slide(0.9);
|
|
994
|
-
}
|
|
995
|
-
else if (e.code === 'ArrowUp' && self.scaleFactor === 1) {
|
|
996
|
-
e.preventDefault();
|
|
997
|
-
self.zoom(self.bpPerPx / 2);
|
|
998
|
-
}
|
|
999
|
-
else if (e.code === 'ArrowDown' && self.scaleFactor === 1) {
|
|
1000
|
-
e.preventDefault();
|
|
1001
|
-
self.zoom(self.bpPerPx * 2);
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
document.addEventListener('keydown', handler);
|
|
1006
|
-
addDisposer(self, () => {
|
|
1007
|
-
document.removeEventListener('keydown', handler);
|
|
1008
|
-
});
|
|
771
|
+
setupKeyboardHandler(self);
|
|
1009
772
|
},
|
|
1010
773
|
afterAttach() {
|
|
1011
|
-
|
|
1012
|
-
var _a;
|
|
1013
|
-
const { init } = self;
|
|
1014
|
-
if (init) {
|
|
1015
|
-
self
|
|
1016
|
-
.navToLocString(init.loc, init.assembly)
|
|
1017
|
-
.catch((e) => {
|
|
1018
|
-
console.error(init, e);
|
|
1019
|
-
getSession(self).notifyError(`${e}`, e);
|
|
1020
|
-
});
|
|
1021
|
-
(_a = init.tracks) === null || _a === void 0 ? void 0 : _a.map(t => self.showTrack(t));
|
|
1022
|
-
self.setInit(undefined);
|
|
1023
|
-
}
|
|
1024
|
-
}));
|
|
1025
|
-
addDisposer(self, autorun(() => {
|
|
1026
|
-
if (self.initialized) {
|
|
1027
|
-
self.setCoarseDynamicBlocks(self.dynamicBlocks);
|
|
1028
|
-
}
|
|
1029
|
-
}, { delay: 150 }));
|
|
1030
|
-
addDisposer(self, autorun(() => {
|
|
1031
|
-
const s = (s) => JSON.stringify(s);
|
|
1032
|
-
const { showCytobandsSetting, showCenterLine, colorByCDS } = self;
|
|
1033
|
-
localStorageSetItem('lgv-showCytobands', s(showCytobandsSetting));
|
|
1034
|
-
localStorageSetItem('lgv-showCenterLine', s(showCenterLine));
|
|
1035
|
-
localStorageSetItem('lgv-colorByCDS', s(colorByCDS));
|
|
1036
|
-
}));
|
|
774
|
+
doAfterAttach(self);
|
|
1037
775
|
},
|
|
1038
776
|
}))
|
|
1039
777
|
.preProcessSnapshot(snap => {
|
|
@@ -1052,13 +790,27 @@ export function stateModelFactory(pluginManager) {
|
|
|
1052
790
|
if (!snap) {
|
|
1053
791
|
return snap;
|
|
1054
792
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
793
|
+
const { init, offsetPx, bpPerPx, hideHeader, hideHeaderOverview, hideNoTracksActive, showGridlines, trackSelectorType, displayedRegions, highlight, showCenterLine, showCytobandsSetting, trackLabels, colorByCDS, showTrackOutlines, ...rest } = snap;
|
|
794
|
+
return {
|
|
795
|
+
...rest,
|
|
796
|
+
...(offsetPx ? { offsetPx } : {}),
|
|
797
|
+
...(bpPerPx !== 1 ? { bpPerPx } : {}),
|
|
798
|
+
...(hideHeader ? { hideHeader } : {}),
|
|
799
|
+
...(hideHeaderOverview ? { hideHeaderOverview } : {}),
|
|
800
|
+
...(hideNoTracksActive ? { hideNoTracksActive } : {}),
|
|
801
|
+
...(!showGridlines ? { showGridlines } : {}),
|
|
802
|
+
...(trackSelectorType !== 'hierarchical' ? { trackSelectorType } : {}),
|
|
803
|
+
...(displayedRegions.length ? { displayedRegions } : {}),
|
|
804
|
+
...(highlight.length ? { highlight } : {}),
|
|
805
|
+
...(showCenterLine ? { showCenterLine } : {}),
|
|
806
|
+
...(!showCytobandsSetting ? { showCytobandsSetting } : {}),
|
|
807
|
+
...(trackLabels ? { trackLabels } : {}),
|
|
808
|
+
...(colorByCDS ? { colorByCDS } : {}),
|
|
809
|
+
...(!showTrackOutlines ? { showTrackOutlines } : {}),
|
|
810
|
+
};
|
|
1059
811
|
});
|
|
1060
812
|
}
|
|
1061
|
-
export { default as LinearGenomeView, default as ReactComponent, } from
|
|
1062
|
-
export { default as RefNameAutocomplete } from
|
|
1063
|
-
export { default as SearchBox } from
|
|
1064
|
-
export { renderToSvg } from
|
|
813
|
+
export { default as LinearGenomeView, default as ReactComponent, } from "./components/LinearGenomeView.js";
|
|
814
|
+
export { default as RefNameAutocomplete } from "./components/RefNameAutocomplete/index.js";
|
|
815
|
+
export { default as SearchBox } from "./components/SearchBox.js";
|
|
816
|
+
export { renderToSvg } from "./svgcomponents/SVGLinearGenomeView.js";
|