@jbrowse/plugin-linear-genome-view 2.4.2 → 2.6.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/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/Block.d.ts +3 -3
- package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -3
- package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +5 -5
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +7 -3
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js.map +1 -1
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +2 -2
- package/dist/BaseLinearDisplay/index.d.ts +5 -2
- package/dist/BaseLinearDisplay/index.js +7 -1
- package/dist/BaseLinearDisplay/index.js.map +1 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +107 -126
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +37 -352
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +190 -0
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js.map +1 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +56 -0
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js.map +1 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +42 -0
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +1 -0
- package/dist/BaseLinearDisplay/models/configSchema.d.ts +35 -1
- package/dist/BaseLinearDisplay/models/configSchema.js +10 -0
- package/dist/BaseLinearDisplay/models/configSchema.js.map +1 -1
- package/dist/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
- package/dist/BaseLinearDisplay/models/renderSvg.js +83 -0
- package/dist/BaseLinearDisplay/models/renderSvg.js.map +1 -0
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +30 -22
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/dist/BaseLinearDisplay/models/util.d.ts +6 -2
- package/dist/BaseLinearDisplay/models/util.js +4 -4
- package/dist/BaseLinearDisplay/models/util.js.map +1 -1
- package/dist/BasicTrack/configSchema.d.ts +73 -1
- package/dist/BasicTrack/configSchema.js +1 -0
- package/dist/BasicTrack/configSchema.js.map +1 -1
- package/dist/FeatureTrack/configSchema.d.ts +73 -1
- package/dist/FeatureTrack/configSchema.js +1 -0
- package/dist/FeatureTrack/configSchema.js.map +1 -1
- package/dist/LinearBareDisplay/configSchema.d.ts +29 -1
- package/dist/LinearBareDisplay/configSchema.js +1 -0
- package/dist/LinearBareDisplay/configSchema.js.map +1 -1
- package/dist/LinearBareDisplay/model.d.ts +106 -42
- package/dist/LinearBareDisplay/model.js +3 -2
- package/dist/LinearBareDisplay/model.js.map +1 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -2
- package/dist/LinearBasicDisplay/configSchema.d.ts +29 -1
- package/dist/LinearBasicDisplay/configSchema.js +1 -9
- package/dist/LinearBasicDisplay/configSchema.js.map +1 -1
- package/dist/LinearBasicDisplay/model.d.ts +124 -62
- package/dist/LinearBasicDisplay/model.js +1 -0
- package/dist/LinearBasicDisplay/model.js.map +1 -1
- package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -2
- package/dist/LinearGenomeView/components/Cytobands.d.ts +24 -24
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -2
- package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -2
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +14 -16
- package/dist/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/Gridlines.d.ts +2 -2
- package/dist/LinearGenomeView/components/Header.d.ts +2 -2
- package/dist/LinearGenomeView/components/ImportForm.d.ts +2 -2
- package/dist/LinearGenomeView/components/ImportForm.js +4 -7
- package/dist/LinearGenomeView/components/ImportForm.js.map +1 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +2 -2
- package/dist/LinearGenomeView/components/LinearGenomeView.js +28 -8
- package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -1
- package/dist/LinearGenomeView/components/MiniControls.d.ts +3 -3
- package/dist/LinearGenomeView/components/MiniControls.js +20 -40
- package/dist/LinearGenomeView/components/MiniControls.js.map +1 -1
- package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
- package/dist/LinearGenomeView/components/OverviewScalebar.js +12 -5
- package/dist/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +22 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +52 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +1 -0
- package/dist/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -2
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +111 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +59 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js.map +1 -0
- package/dist/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +2 -2
- package/dist/LinearGenomeView/components/SearchBox.d.ts +2 -2
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -4
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +6 -82
- package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +9 -0
- package/dist/LinearGenomeView/components/SearchResultsTable.js +83 -0
- package/dist/LinearGenomeView/components/SearchResultsTable.js.map +1 -0
- package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +3 -4
- package/dist/LinearGenomeView/components/TrackContainer.js +17 -67
- package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -1
- package/dist/LinearGenomeView/components/TrackLabel.js +6 -10
- package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -1
- package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +32 -0
- package/dist/LinearGenomeView/components/TrackLabelContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +74 -0
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/dist/LinearGenomeView/components/TracksContainer.js +5 -7
- package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -1
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +2 -2
- package/dist/LinearGenomeView/components/ZoomControls.d.ts +2 -2
- package/dist/LinearGenomeView/components/util.js +1 -1
- package/dist/LinearGenomeView/components/util.js.map +1 -1
- package/dist/LinearGenomeView/model.d.ts +51 -37
- package/dist/LinearGenomeView/model.js +132 -209
- package/dist/LinearGenomeView/model.js.map +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -5
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +7 -2
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -2
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -2
- package/dist/LinearGenomeView/util.d.ts +29 -0
- package/dist/LinearGenomeView/util.js +79 -1
- package/dist/LinearGenomeView/util.js.map +1 -1
- package/dist/index.d.ts +325 -180
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/Block.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +5 -5
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +7 -3
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js.map +1 -1
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +2 -2
- package/esm/BaseLinearDisplay/index.d.ts +5 -2
- package/esm/BaseLinearDisplay/index.js +3 -0
- package/esm/BaseLinearDisplay/index.js.map +1 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +107 -126
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +39 -331
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +184 -0
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js.map +1 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +53 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js.map +1 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +39 -0
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +1 -0
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +35 -1
- package/esm/BaseLinearDisplay/models/configSchema.js +10 -0
- package/esm/BaseLinearDisplay/models/configSchema.js.map +1 -1
- package/esm/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
- package/esm/BaseLinearDisplay/models/renderSvg.js +54 -0
- package/esm/BaseLinearDisplay/models/renderSvg.js.map +1 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +30 -22
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/esm/BaseLinearDisplay/models/util.d.ts +6 -2
- package/esm/BaseLinearDisplay/models/util.js +2 -2
- package/esm/BaseLinearDisplay/models/util.js.map +1 -1
- package/esm/BasicTrack/configSchema.d.ts +73 -1
- package/esm/BasicTrack/configSchema.js +1 -0
- package/esm/BasicTrack/configSchema.js.map +1 -1
- package/esm/FeatureTrack/configSchema.d.ts +73 -1
- package/esm/FeatureTrack/configSchema.js +1 -0
- package/esm/FeatureTrack/configSchema.js.map +1 -1
- package/esm/LinearBareDisplay/configSchema.d.ts +29 -1
- package/esm/LinearBareDisplay/configSchema.js +1 -0
- package/esm/LinearBareDisplay/configSchema.js.map +1 -1
- package/esm/LinearBareDisplay/model.d.ts +106 -42
- package/esm/LinearBareDisplay/model.js +2 -1
- package/esm/LinearBareDisplay/model.js.map +1 -1
- package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -2
- package/esm/LinearBasicDisplay/configSchema.d.ts +29 -1
- package/esm/LinearBasicDisplay/configSchema.js +1 -9
- package/esm/LinearBasicDisplay/configSchema.js.map +1 -1
- package/esm/LinearBasicDisplay/model.d.ts +124 -62
- package/esm/LinearBasicDisplay/model.js +1 -0
- package/esm/LinearBasicDisplay/model.js.map +1 -1
- package/esm/LinearGenomeView/components/CenterLine.d.ts +2 -2
- package/esm/LinearGenomeView/components/Cytobands.d.ts +24 -24
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +15 -17
- package/esm/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/Gridlines.d.ts +2 -2
- package/esm/LinearGenomeView/components/Header.d.ts +2 -2
- package/esm/LinearGenomeView/components/ImportForm.d.ts +2 -2
- package/esm/LinearGenomeView/components/ImportForm.js +5 -8
- package/esm/LinearGenomeView/components/ImportForm.js.map +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +2 -2
- package/esm/LinearGenomeView/components/LinearGenomeView.js +4 -7
- package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -1
- package/esm/LinearGenomeView/components/MiniControls.d.ts +3 -3
- package/esm/LinearGenomeView/components/MiniControls.js +20 -17
- package/esm/LinearGenomeView/components/MiniControls.js.map +1 -1
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +12 -5
- package/esm/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +16 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +23 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +1 -0
- package/esm/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -2
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +83 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +50 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js.map +1 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +2 -2
- package/esm/LinearGenomeView/components/SearchBox.d.ts +2 -2
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -4
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +7 -83
- package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchResultsTable.js +77 -0
- package/esm/LinearGenomeView/components/SearchResultsTable.js.map +1 -0
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +3 -4
- package/esm/LinearGenomeView/components/TrackContainer.js +18 -68
- package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -1
- package/esm/LinearGenomeView/components/TrackLabel.js +6 -10
- package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -1
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +27 -0
- package/esm/LinearGenomeView/components/TrackLabelContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +49 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +5 -7
- package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -2
- package/esm/LinearGenomeView/components/ZoomControls.d.ts +2 -2
- package/esm/LinearGenomeView/components/util.js +1 -1
- package/esm/LinearGenomeView/components/util.js.map +1 -1
- package/esm/LinearGenomeView/model.d.ts +51 -37
- package/esm/LinearGenomeView/model.js +129 -206
- package/esm/LinearGenomeView/model.js.map +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -5
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +7 -2
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -2
- package/esm/LinearGenomeView/util.d.ts +29 -0
- package/esm/LinearGenomeView/util.js +76 -0
- package/esm/LinearGenomeView/util.js.map +1 -1
- package/esm/index.d.ts +325 -180
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/BaseLinearDisplay/components/TooLargeMessage.tsx +10 -6
- package/src/BaseLinearDisplay/index.ts +5 -1
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +50 -401
- package/src/BaseLinearDisplay/models/FeatureDensityMixin.tsx +213 -0
- package/src/BaseLinearDisplay/models/TrackHeightMixin.tsx +59 -0
- package/src/BaseLinearDisplay/models/autorunFeatureDensityStats.ts +46 -0
- package/src/BaseLinearDisplay/models/configSchema.ts +11 -0
- package/src/BaseLinearDisplay/models/renderSvg.tsx +101 -0
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +40 -32
- package/src/BaseLinearDisplay/models/util.ts +10 -4
- package/src/BasicTrack/configSchema.ts +1 -0
- package/src/FeatureTrack/configSchema.ts +1 -0
- package/src/LinearBareDisplay/configSchema.ts +1 -0
- package/src/LinearBareDisplay/model.ts +2 -1
- package/src/LinearBasicDisplay/configSchema.ts +1 -10
- package/src/LinearBasicDisplay/model.ts +1 -0
- package/src/LinearGenomeView/components/GetSequenceDialog.tsx +15 -25
- package/src/LinearGenomeView/components/ImportForm.tsx +4 -14
- package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +3 -3
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +6 -17
- package/src/LinearGenomeView/components/MiniControls.tsx +37 -38
- package/src/LinearGenomeView/components/OverviewScalebar.tsx +13 -6
- package/src/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.tsx +53 -0
- package/src/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.tsx +44 -0
- package/src/LinearGenomeView/components/RefNameAutocomplete/index.tsx +160 -0
- package/src/LinearGenomeView/components/RefNameAutocomplete/util.ts +65 -0
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +17 -112
- package/src/LinearGenomeView/components/SearchResultsTable.tsx +121 -0
- package/src/LinearGenomeView/components/TrackContainer.tsx +25 -104
- package/src/LinearGenomeView/components/TrackLabel.tsx +7 -27
- package/src/LinearGenomeView/components/TrackLabelContainer.tsx +48 -0
- package/src/LinearGenomeView/components/TrackRenderingContainer.tsx +96 -0
- package/src/LinearGenomeView/components/TracksContainer.tsx +9 -6
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +14 -14
- package/src/LinearGenomeView/components/util.ts +2 -1
- package/src/LinearGenomeView/index.test.ts +10 -12
- package/src/LinearGenomeView/model.ts +175 -247
- package/src/LinearGenomeView/svgcomponents/SVGHeader.tsx +8 -6
- package/src/LinearGenomeView/svgcomponents/SVGLinearGenomeView.tsx +1 -1
- package/src/LinearGenomeView/util.ts +98 -0
- package/src/index.ts +11 -5
- package/dist/LinearGenomeView/components/HelpDialog.js.map +0 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js +0 -182
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
- package/esm/LinearGenomeView/components/HelpDialog.js.map +0 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js +0 -154
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +0 -279
- /package/dist/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -0
- /package/esm/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -0
- /package/src/LinearGenomeView/components/{HelpDialog.tsx → RefNameAutocomplete/HelpDialog.tsx} +0 -0
package/esm/index.js
CHANGED
|
@@ -44,7 +44,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
export { configSchemaFactory as linearBareDisplayConfigSchemaFactory } from './LinearBareDisplay';
|
|
47
|
-
export {
|
|
47
|
+
export { baseLinearDisplayConfigSchema, BaseLinearDisplay, BlockMsg, BaseLinearDisplayComponent, TrackHeightMixin, FeatureDensityMixin, TooLargeMessage, } from './BaseLinearDisplay';
|
|
48
48
|
export { RefNameAutocomplete, SearchBox, } from './LinearGenomeView';
|
|
49
49
|
export { renderToSvg, SVGTracks, totalHeight, SVGRuler, } from './LinearGenomeView/svgcomponents/SVGLinearGenomeView';
|
|
50
50
|
export { configSchema as linearBasicDisplayConfigSchemaFactory, modelFactory as linearBasicDisplayModelFactory, } from './LinearBasicDisplay';
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAEzC,OAAO,EAAwB,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAEhF,QAAQ;AACR,OAAO,aAAa,MAAM,+BAA+B,CAAA;AAEzD,SAAS;AACT,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,kBAAkB,MAAM,qBAAqB,CAAA;AACpD,OAAO,iBAAiB,EAAE,EACxB,SAAS,EACT,YAAY,EACZ,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,mBAAmB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAEzC,OAAO,EAAwB,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAEhF,QAAQ;AACR,OAAO,aAAa,MAAM,+BAA+B,CAAA;AAEzD,SAAS;AACT,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,kBAAkB,MAAM,qBAAqB,CAAA;AACpD,OAAO,iBAAiB,EAAE,EACxB,SAAS,EACT,YAAY,EACZ,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,mBAAmB,MAAM,sBAAsB,CAAA;AACtD,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAC1C,OAAO,WAAW,MAAM,cAAc,CAAA;AACtC,OAAO,uBAAuB,MAAM,0BAA0B,CAAA;AAE9D,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,MAAM;IAA1D;;QACE,SAAI,GAAG,wBAAwB,CAAA;QAE/B,YAAO,GAAG;YACR,0BAA0B;YAC1B,iBAAiB;YACjB,6BAA6B;YAC7B,SAAS;YACT,YAAY;YACZ,gBAAgB;SACjB,CAAA;IAsBH,CAAC;IApBC,OAAO,CAAC,aAA4B;QAClC,aAAa,CAAC,aAAa,CAAC,CAAA;QAC5B,WAAW,CAAC,aAAa,CAAC,CAAA;QAC1B,mBAAmB,CAAC,aAAa,CAAC,CAAA;QAClC,iBAAiB,CAAC,aAAa,CAAC,CAAA;QAChC,kBAAkB,CAAC,aAAa,CAAC,CAAA;QACjC,uBAAuB,CAAC,aAAa,CAAC,CAAA;IACxC,CAAC;IAED,SAAS,CAAC,aAA4B;QACpC,IAAI,qBAAqB,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE;YAClD,aAAa,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,EAAE;gBAC/C,KAAK,EAAE,oBAAoB;gBAC3B,IAAI,EAAE,aAAa;gBACnB,OAAO,EAAE,CAAC,OAA6B,EAAE,EAAE;oBACzC,OAAO,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAA;gBACzC,CAAC;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF;AAQD,OAAO,EAAE,mBAAmB,IAAI,oCAAoC,EAAE,MAAM,qBAAqB,CAAA;AACjG,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,EACjB,QAAQ,EACR,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAGL,mBAAmB,EACnB,SAAS,GACV,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,GACT,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EACL,YAAY,IAAI,qCAAqC,EACrD,YAAY,IAAI,8BAA8B,GAC/C,MAAM,sBAAsB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-linear-genome-view",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "JBrowse 2 linear genome view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"file-saver": "^2.0.0",
|
|
50
50
|
"material-ui-popup-state": "^5.0.0",
|
|
51
51
|
"normalize-wheel": "^1.0.1",
|
|
52
|
-
"react-error-boundary": "^
|
|
52
|
+
"react-error-boundary": "^4.0.3",
|
|
53
53
|
"react-popper": "^2.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"module": "esm/index.js",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "1cbe7ba097fb2d2763c776e5e429e4670cdd583c"
|
|
70
70
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
3
3
|
|
|
4
4
|
// locals
|
|
5
5
|
import BlockMsg from '../components/BlockMsg'
|
|
@@ -9,8 +9,8 @@ function TooLargeMessage({
|
|
|
9
9
|
}: {
|
|
10
10
|
model: {
|
|
11
11
|
regionTooLargeReason: string
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
featureDensityStats?: FeatureDensityStats
|
|
13
|
+
setFeatureDensityStatsLimit: (s?: FeatureDensityStats) => void
|
|
14
14
|
reload: () => void
|
|
15
15
|
}
|
|
16
16
|
}) {
|
|
@@ -19,12 +19,16 @@ function TooLargeMessage({
|
|
|
19
19
|
<BlockMsg
|
|
20
20
|
severity="warning"
|
|
21
21
|
action={() => {
|
|
22
|
-
model.
|
|
22
|
+
model.setFeatureDensityStatsLimit(model.featureDensityStats)
|
|
23
23
|
model.reload()
|
|
24
24
|
}}
|
|
25
25
|
buttonText="Force load"
|
|
26
|
-
message={
|
|
27
|
-
|
|
26
|
+
message={[
|
|
27
|
+
regionTooLargeReason,
|
|
28
|
+
'Zoom in to see features or force load (may be slow)',
|
|
29
|
+
]
|
|
30
|
+
.filter(f => !!f)
|
|
31
|
+
.join('. ')}
|
|
28
32
|
/>
|
|
29
33
|
)
|
|
30
34
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { default as baseLinearDisplayConfigSchema } from './models/configSchema'
|
|
2
|
-
export { BaseLinearDisplay } from './models/BaseLinearDisplayModel'
|
|
3
2
|
export type { BlockModel } from './models/serverSideRenderedBlock'
|
|
3
|
+
export { BaseLinearDisplay } from './models/BaseLinearDisplayModel'
|
|
4
4
|
export type {
|
|
5
|
+
ExportSvgDisplayOptions,
|
|
5
6
|
BaseLinearDisplayModel,
|
|
6
7
|
BaseLinearDisplayStateModel,
|
|
7
8
|
} from './models/BaseLinearDisplayModel'
|
|
@@ -10,3 +11,6 @@ export {
|
|
|
10
11
|
Tooltip,
|
|
11
12
|
BlockMsg,
|
|
12
13
|
} from './components/BaseLinearDisplay'
|
|
14
|
+
export { default as TrackHeightMixin } from './models/TrackHeightMixin'
|
|
15
|
+
export { default as FeatureDensityMixin } from './models/FeatureDensityMixin'
|
|
16
|
+
export { default as TooLargeMessage } from './components/TooLargeMessage'
|
|
@@ -2,23 +2,18 @@
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { ThemeOptions } from '@mui/material'
|
|
4
4
|
import { BaseDisplay } from '@jbrowse/core/pluggableElementTypes/models'
|
|
5
|
-
import {
|
|
5
|
+
import { ConfigurationReference } from '@jbrowse/core/configuration'
|
|
6
6
|
import { MenuItem } from '@jbrowse/core/ui'
|
|
7
7
|
import {
|
|
8
|
-
isAbortException,
|
|
9
8
|
getContainingView,
|
|
10
9
|
getContainingTrack,
|
|
11
10
|
getSession,
|
|
12
|
-
getViewParams,
|
|
13
11
|
isSelectionContainer,
|
|
14
12
|
isSessionModelWithWidgets,
|
|
15
13
|
isFeature,
|
|
16
14
|
Feature,
|
|
17
|
-
ReactRendering,
|
|
18
15
|
} from '@jbrowse/core/util'
|
|
19
|
-
import { Stats } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
20
16
|
import { BaseBlock } from '@jbrowse/core/util/blockTypes'
|
|
21
|
-
import { Region } from '@jbrowse/core/util/types'
|
|
22
17
|
import CompositeMap from '@jbrowse/core/util/compositeMap'
|
|
23
18
|
import { getParentRenderProps } from '@jbrowse/core/util/tracks'
|
|
24
19
|
import { autorun } from 'mobx'
|
|
@@ -30,9 +25,11 @@ import MenuOpenIcon from '@mui/icons-material/MenuOpen'
|
|
|
30
25
|
// locals
|
|
31
26
|
import { LinearGenomeViewModel, ExportSvgOptions } from '../../LinearGenomeView'
|
|
32
27
|
import { Tooltip } from '../components/BaseLinearDisplay'
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
28
|
+
import BlockState from './serverSideRenderedBlock'
|
|
29
|
+
import configSchema from './configSchema'
|
|
30
|
+
import renderBaseLinearDisplaySvg from './renderSvg'
|
|
31
|
+
import TrackHeightMixin from './TrackHeightMixin'
|
|
32
|
+
import FeatureDensityMixin from './FeatureDensityMixin'
|
|
36
33
|
|
|
37
34
|
type LGV = LinearGenomeViewModel
|
|
38
35
|
|
|
@@ -46,10 +43,14 @@ export interface Layout {
|
|
|
46
43
|
|
|
47
44
|
type LayoutRecord = [number, number, number, number]
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
export interface ExportSvgDisplayOptions extends ExportSvgOptions {
|
|
47
|
+
overrideHeight: number
|
|
48
|
+
theme: ThemeOptions
|
|
49
|
+
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* #stateModel BaseLinearDisplay
|
|
53
|
+
* #category display
|
|
53
54
|
* extends `BaseDisplay`
|
|
54
55
|
*/
|
|
55
56
|
function stateModelFactory() {
|
|
@@ -57,17 +58,9 @@ function stateModelFactory() {
|
|
|
57
58
|
.compose(
|
|
58
59
|
'BaseLinearDisplay',
|
|
59
60
|
BaseDisplay,
|
|
61
|
+
TrackHeightMixin(),
|
|
62
|
+
FeatureDensityMixin(),
|
|
60
63
|
types.model({
|
|
61
|
-
/**
|
|
62
|
-
* #property
|
|
63
|
-
*/
|
|
64
|
-
heightPreConfig: types.maybe(
|
|
65
|
-
types.refinement(
|
|
66
|
-
'displayHeight',
|
|
67
|
-
types.number,
|
|
68
|
-
n => n >= minDisplayHeight,
|
|
69
|
-
),
|
|
70
|
-
),
|
|
71
64
|
/**
|
|
72
65
|
* #property
|
|
73
66
|
* updated via autorun
|
|
@@ -76,26 +69,14 @@ function stateModelFactory() {
|
|
|
76
69
|
/**
|
|
77
70
|
* #property
|
|
78
71
|
*/
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* #property
|
|
82
|
-
*/
|
|
83
|
-
userByteSizeLimit: types.maybe(types.number),
|
|
72
|
+
configuration: ConfigurationReference(configSchema),
|
|
84
73
|
}),
|
|
85
74
|
)
|
|
86
75
|
.volatile(() => ({
|
|
87
|
-
currBpPerPx: 0,
|
|
88
|
-
scrollTop: 0,
|
|
89
|
-
message: '',
|
|
90
76
|
featureIdUnderMouse: undefined as undefined | string,
|
|
91
77
|
contextMenuFeature: undefined as undefined | Feature,
|
|
92
|
-
estimatedRegionsStatsP: undefined as undefined | Promise<Stats>,
|
|
93
|
-
estimatedRegionsStats: undefined as undefined | Stats,
|
|
94
78
|
}))
|
|
95
79
|
.views(self => ({
|
|
96
|
-
get height() {
|
|
97
|
-
return self.heightPreConfig ?? (getConf(self, 'height') as number)
|
|
98
|
-
},
|
|
99
80
|
/**
|
|
100
81
|
* #getter
|
|
101
82
|
*/
|
|
@@ -106,12 +87,11 @@ function stateModelFactory() {
|
|
|
106
87
|
* #getter
|
|
107
88
|
*/
|
|
108
89
|
get blockDefinitions() {
|
|
109
|
-
const { blockType } = this
|
|
110
90
|
const view = getContainingView(self) as LGV
|
|
111
91
|
if (!view.initialized) {
|
|
112
92
|
throw new Error('view not initialized yet')
|
|
113
93
|
}
|
|
114
|
-
return view[blockType]
|
|
94
|
+
return view[this.blockType]
|
|
115
95
|
},
|
|
116
96
|
}))
|
|
117
97
|
.views(self => ({
|
|
@@ -210,152 +190,9 @@ function stateModelFactory() {
|
|
|
210
190
|
})
|
|
211
191
|
return ret
|
|
212
192
|
},
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* #getter
|
|
216
|
-
*/
|
|
217
|
-
get currentBytesRequested() {
|
|
218
|
-
return self.estimatedRegionsStats?.bytes || 0
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* #getter
|
|
223
|
-
*/
|
|
224
|
-
get currentFeatureScreenDensity() {
|
|
225
|
-
const view = getContainingView(self) as LGV
|
|
226
|
-
return (self.estimatedRegionsStats?.featureDensity || 0) * view.bpPerPx
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* #getter
|
|
231
|
-
*/
|
|
232
|
-
get maxFeatureScreenDensity() {
|
|
233
|
-
return getConf(self, 'maxFeatureScreenDensity')
|
|
234
|
-
},
|
|
235
|
-
/**
|
|
236
|
-
* #getter
|
|
237
|
-
*/
|
|
238
|
-
get estimatedStatsReady() {
|
|
239
|
-
return !!self.estimatedRegionsStats || !!self.userBpPerPxLimit
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* #getter
|
|
244
|
-
*/
|
|
245
|
-
get maxAllowableBytes() {
|
|
246
|
-
return (
|
|
247
|
-
self.userByteSizeLimit ||
|
|
248
|
-
self.estimatedRegionsStats?.fetchSizeLimit ||
|
|
249
|
-
(getConf(self, 'fetchSizeLimit') as number)
|
|
250
|
-
)
|
|
251
|
-
},
|
|
252
193
|
}))
|
|
253
|
-
.actions(self => ({
|
|
254
|
-
/**
|
|
255
|
-
* #action
|
|
256
|
-
*/
|
|
257
|
-
setMessage(message: string) {
|
|
258
|
-
self.message = message
|
|
259
|
-
},
|
|
260
|
-
}))
|
|
261
|
-
.actions(self => ({
|
|
262
|
-
afterAttach() {
|
|
263
|
-
// watch the parent's blocks to update our block state when they change,
|
|
264
|
-
// then we recreate the blocks on our own model (creating and deleting to
|
|
265
|
-
// match the parent blocks)
|
|
266
|
-
addDisposer(
|
|
267
|
-
self,
|
|
268
|
-
autorun(() => {
|
|
269
|
-
const blocksPresent: { [key: string]: boolean } = {}
|
|
270
|
-
const view = getContainingView(self) as LGV
|
|
271
|
-
if (view.initialized) {
|
|
272
|
-
self.blockDefinitions.contentBlocks.forEach(block => {
|
|
273
|
-
blocksPresent[block.key] = true
|
|
274
|
-
if (!self.blockState.has(block.key)) {
|
|
275
|
-
this.addBlock(block.key, block)
|
|
276
|
-
}
|
|
277
|
-
})
|
|
278
|
-
self.blockState.forEach((_, key) => {
|
|
279
|
-
if (!blocksPresent[key]) {
|
|
280
|
-
this.deleteBlock(key)
|
|
281
|
-
}
|
|
282
|
-
})
|
|
283
|
-
}
|
|
284
|
-
}),
|
|
285
|
-
)
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* #action
|
|
290
|
-
*/
|
|
291
|
-
async estimateRegionsStats() {
|
|
292
|
-
if (!self.estimatedRegionsStatsP) {
|
|
293
|
-
self.estimatedRegionsStatsP = estimateRegionsStatsPre(self).catch(
|
|
294
|
-
e => {
|
|
295
|
-
this.setRegionsStatsP(undefined)
|
|
296
|
-
throw e
|
|
297
|
-
},
|
|
298
|
-
)
|
|
299
|
-
}
|
|
300
|
-
return self.estimatedRegionsStatsP
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* #action
|
|
305
|
-
*/
|
|
306
|
-
setRegionsStatsP(arg: any) {
|
|
307
|
-
self.estimatedRegionsStatsP = arg
|
|
308
|
-
},
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* #action
|
|
312
|
-
*/
|
|
313
|
-
setRegionsStats(estimatedRegionsStats?: Stats) {
|
|
314
|
-
self.estimatedRegionsStats = estimatedRegionsStats
|
|
315
|
-
},
|
|
316
|
-
/**
|
|
317
|
-
* #action
|
|
318
|
-
*/
|
|
319
|
-
clearRegionsStats() {
|
|
320
|
-
self.estimatedRegionsStatsP = undefined
|
|
321
|
-
self.estimatedRegionsStats = undefined
|
|
322
|
-
},
|
|
323
|
-
/**
|
|
324
|
-
* #action
|
|
325
|
-
*/
|
|
326
|
-
setHeight(displayHeight: number) {
|
|
327
|
-
self.heightPreConfig =
|
|
328
|
-
displayHeight > minDisplayHeight ? displayHeight : minDisplayHeight
|
|
329
|
-
return self.height
|
|
330
|
-
},
|
|
331
|
-
/**
|
|
332
|
-
* #action
|
|
333
|
-
*/
|
|
334
|
-
resizeHeight(distance: number) {
|
|
335
|
-
const oldHeight = self.height
|
|
336
|
-
const newHeight = this.setHeight(self.height + distance)
|
|
337
|
-
return newHeight - oldHeight
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* #action
|
|
342
|
-
*/
|
|
343
|
-
setScrollTop(scrollTop: number) {
|
|
344
|
-
self.scrollTop = scrollTop
|
|
345
|
-
},
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* #action
|
|
349
|
-
*/
|
|
350
|
-
updateStatsLimit(stats?: Stats) {
|
|
351
|
-
const view = getContainingView(self) as LGV
|
|
352
|
-
if (stats?.bytes) {
|
|
353
|
-
self.userByteSizeLimit = stats.bytes
|
|
354
|
-
} else {
|
|
355
|
-
self.userBpPerPxLimit = view.bpPerPx
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
194
|
|
|
195
|
+
.actions(self => ({
|
|
359
196
|
/**
|
|
360
197
|
* #action
|
|
361
198
|
*/
|
|
@@ -368,12 +205,7 @@ function stateModelFactory() {
|
|
|
368
205
|
}),
|
|
369
206
|
)
|
|
370
207
|
},
|
|
371
|
-
|
|
372
|
-
* #action
|
|
373
|
-
*/
|
|
374
|
-
setCurrBpPerPx(n: number) {
|
|
375
|
-
self.currBpPerPx = n
|
|
376
|
-
},
|
|
208
|
+
|
|
377
209
|
/**
|
|
378
210
|
* #action
|
|
379
211
|
*/
|
|
@@ -406,21 +238,15 @@ function stateModelFactory() {
|
|
|
406
238
|
* #action
|
|
407
239
|
*/
|
|
408
240
|
clearFeatureSelection() {
|
|
409
|
-
|
|
410
|
-
session.clearSelection()
|
|
241
|
+
getSession(self).clearSelection()
|
|
411
242
|
},
|
|
412
243
|
/**
|
|
413
244
|
* #action
|
|
414
245
|
*/
|
|
415
|
-
setFeatureIdUnderMouse(feature
|
|
246
|
+
setFeatureIdUnderMouse(feature?: string) {
|
|
416
247
|
self.featureIdUnderMouse = feature
|
|
417
248
|
},
|
|
418
|
-
|
|
419
|
-
* #action
|
|
420
|
-
*/
|
|
421
|
-
reload() {
|
|
422
|
-
;[...self.blockState.values()].map(val => val.doReload())
|
|
423
|
-
},
|
|
249
|
+
|
|
424
250
|
/**
|
|
425
251
|
* #action
|
|
426
252
|
*/
|
|
@@ -428,41 +254,7 @@ function stateModelFactory() {
|
|
|
428
254
|
self.contextMenuFeature = feature
|
|
429
255
|
},
|
|
430
256
|
}))
|
|
431
|
-
.views(self => ({
|
|
432
|
-
/**
|
|
433
|
-
* #getter
|
|
434
|
-
* region is too large if:
|
|
435
|
-
* - stats are ready
|
|
436
|
-
* - region is greater than 20kb (don't warn when zoomed in less than that)
|
|
437
|
-
* - and bytes is greater than max allowed bytes or density greater than max density
|
|
438
|
-
*/
|
|
439
|
-
get regionTooLarge() {
|
|
440
|
-
const view = getContainingView(self) as LGV
|
|
441
|
-
if (!self.estimatedStatsReady || view.dynamicBlocks.totalBp < 20_000) {
|
|
442
|
-
return false
|
|
443
|
-
}
|
|
444
|
-
return (
|
|
445
|
-
self.currentBytesRequested > self.maxAllowableBytes ||
|
|
446
|
-
(self.userBpPerPxLimit
|
|
447
|
-
? view.bpPerPx > self.userBpPerPxLimit
|
|
448
|
-
: self.currentFeatureScreenDensity > self.maxFeatureScreenDensity)
|
|
449
|
-
)
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* #getter
|
|
454
|
-
* only shows a message of bytes requested is defined, the feature density
|
|
455
|
-
* based stats don't produce any helpful message besides to zoom in
|
|
456
|
-
*/
|
|
457
|
-
get regionTooLargeReason() {
|
|
458
|
-
const req = self.currentBytesRequested
|
|
459
|
-
const max = self.maxAllowableBytes
|
|
460
257
|
|
|
461
|
-
return req && req > max
|
|
462
|
-
? `Requested too much data (${getDisplayStr(req)})`
|
|
463
|
-
: ''
|
|
464
|
-
},
|
|
465
|
-
}))
|
|
466
258
|
.actions(self => {
|
|
467
259
|
const { reload: superReload } = self
|
|
468
260
|
|
|
@@ -472,99 +264,15 @@ function stateModelFactory() {
|
|
|
472
264
|
*/
|
|
473
265
|
async reload() {
|
|
474
266
|
self.setError()
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
if (!view.initialized || !view.staticBlocks.contentBlocks.length) {
|
|
480
|
-
return
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
try {
|
|
484
|
-
const estimatedRegionsStats = await self.estimateRegionsStats()
|
|
485
|
-
|
|
486
|
-
if (isAlive(self)) {
|
|
487
|
-
self.setRegionsStats(estimatedRegionsStats)
|
|
488
|
-
superReload()
|
|
489
|
-
}
|
|
490
|
-
} catch (e) {
|
|
491
|
-
console.error(e)
|
|
492
|
-
self.setError(e)
|
|
493
|
-
}
|
|
267
|
+
self.setCurrStatsBpPerPx(0)
|
|
268
|
+
self.clearFeatureDensityStats()
|
|
269
|
+
;[...self.blockState.values()].map(val => val.doReload())
|
|
270
|
+
superReload()
|
|
494
271
|
},
|
|
495
272
|
}
|
|
496
273
|
})
|
|
497
|
-
.actions(self => ({
|
|
498
|
-
afterAttach() {
|
|
499
|
-
// this autorun performs stats estimation
|
|
500
|
-
//
|
|
501
|
-
// the chain of events calls estimateRegionsStats against the data
|
|
502
|
-
// adapter which by default uses featureDensity, but can also respond
|
|
503
|
-
// with a byte size estimate and fetch size limit (data adapter can
|
|
504
|
-
// define what is too much data)
|
|
505
|
-
addDisposer(
|
|
506
|
-
self,
|
|
507
|
-
autorun(async () => {
|
|
508
|
-
try {
|
|
509
|
-
const view = getContainingView(self) as LGV
|
|
510
|
-
|
|
511
|
-
// extra check for contentBlocks.length
|
|
512
|
-
// https://github.com/GMOD/jbrowse-components/issues/2694
|
|
513
|
-
if (
|
|
514
|
-
!view.initialized ||
|
|
515
|
-
!view.staticBlocks.contentBlocks.length
|
|
516
|
-
) {
|
|
517
|
-
return
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
// don't re-estimate featureDensity even if zoom level changes,
|
|
521
|
-
// jbrowse1-style assume it's sort of representative
|
|
522
|
-
if (self.estimatedRegionsStats?.featureDensity !== undefined) {
|
|
523
|
-
self.setCurrBpPerPx(view.bpPerPx)
|
|
524
|
-
return
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
// we estimate stats once at a given zoom level
|
|
528
|
-
if (view.bpPerPx === self.currBpPerPx) {
|
|
529
|
-
return
|
|
530
|
-
}
|
|
531
274
|
|
|
532
|
-
self.clearRegionsStats()
|
|
533
|
-
self.setCurrBpPerPx(view.bpPerPx)
|
|
534
|
-
const estimatedRegionsStats = await self.estimateRegionsStats()
|
|
535
|
-
if (isAlive(self)) {
|
|
536
|
-
self.setRegionsStats(estimatedRegionsStats)
|
|
537
|
-
}
|
|
538
|
-
} catch (e) {
|
|
539
|
-
if (!isAbortException(e) && isAlive(self)) {
|
|
540
|
-
console.error(e)
|
|
541
|
-
self.setError(e)
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}),
|
|
545
|
-
)
|
|
546
|
-
},
|
|
547
|
-
}))
|
|
548
275
|
.views(self => ({
|
|
549
|
-
/**
|
|
550
|
-
* #method
|
|
551
|
-
*/
|
|
552
|
-
regionCannotBeRenderedText(_region: Region) {
|
|
553
|
-
return self.regionTooLarge ? 'Force load to see features' : ''
|
|
554
|
-
},
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* #method
|
|
558
|
-
* @param region -
|
|
559
|
-
* @returns falsy if the region is fine to try rendering. Otherwise,
|
|
560
|
-
* return a react node + string of text.
|
|
561
|
-
* string of text describes why it cannot be rendered
|
|
562
|
-
* react node allows user to force load at current setting
|
|
563
|
-
*/
|
|
564
|
-
regionCannotBeRendered(_region: Region) {
|
|
565
|
-
return self.regionTooLarge ? <TooLargeMessage model={self} /> : null
|
|
566
|
-
},
|
|
567
|
-
|
|
568
276
|
/**
|
|
569
277
|
* #method
|
|
570
278
|
*/
|
|
@@ -596,11 +304,9 @@ function stateModelFactory() {
|
|
|
596
304
|
* #method
|
|
597
305
|
*/
|
|
598
306
|
renderProps() {
|
|
599
|
-
const view = getContainingView(self) as LGV
|
|
600
307
|
return {
|
|
601
308
|
...getParentRenderProps(self),
|
|
602
|
-
notReady:
|
|
603
|
-
self.currBpPerPx !== view.bpPerPx || !self.estimatedRegionsStats,
|
|
309
|
+
notReady: !self.featureDensityStatsReady,
|
|
604
310
|
rpcDriverName: self.rpcDriverName,
|
|
605
311
|
displayModel: self,
|
|
606
312
|
onFeatureClick(_: unknown, featureId?: string) {
|
|
@@ -647,91 +353,34 @@ function stateModelFactory() {
|
|
|
647
353
|
/**
|
|
648
354
|
* #method
|
|
649
355
|
*/
|
|
650
|
-
async renderSvg(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
key: block.key,
|
|
665
|
-
region: block,
|
|
666
|
-
})
|
|
667
|
-
|
|
668
|
-
// regionCannotBeRendered can return jsx so look for plaintext
|
|
669
|
-
// version, or just get the default if none available
|
|
670
|
-
const cannotBeRenderedReason =
|
|
671
|
-
self.regionCannotBeRenderedText(block) ||
|
|
672
|
-
self.regionCannotBeRendered(block)
|
|
673
|
-
|
|
674
|
-
if (cannotBeRenderedReason) {
|
|
675
|
-
return [
|
|
676
|
-
block,
|
|
677
|
-
{
|
|
678
|
-
reactElement: (
|
|
679
|
-
<>
|
|
680
|
-
<rect x={0} y={0} width={width} height={20} fill="#aaa" />
|
|
681
|
-
<text x={0} y={15}>
|
|
682
|
-
{cannotBeRenderedReason}
|
|
683
|
-
</text>
|
|
684
|
-
</>
|
|
685
|
-
),
|
|
686
|
-
},
|
|
687
|
-
] as const
|
|
356
|
+
async renderSvg(opts: ExportSvgDisplayOptions) {
|
|
357
|
+
return renderBaseLinearDisplaySvg(self as BaseLinearDisplayModel, opts)
|
|
358
|
+
},
|
|
359
|
+
afterAttach() {
|
|
360
|
+
// watch the parent's blocks to update our block state when they change,
|
|
361
|
+
// then we recreate the blocks on our own model (creating and deleting to
|
|
362
|
+
// match the parent blocks)
|
|
363
|
+
addDisposer(
|
|
364
|
+
self,
|
|
365
|
+
autorun(() => {
|
|
366
|
+
const blocksPresent: { [key: string]: boolean } = {}
|
|
367
|
+
const view = getContainingView(self) as LGV
|
|
368
|
+
if (!view.initialized) {
|
|
369
|
+
return
|
|
688
370
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
theme: opts.theme || renderProps.theme,
|
|
701
|
-
}),
|
|
702
|
-
] as const
|
|
371
|
+
self.blockDefinitions.contentBlocks.forEach(block => {
|
|
372
|
+
blocksPresent[block.key] = true
|
|
373
|
+
if (!self.blockState.has(block.key)) {
|
|
374
|
+
self.addBlock(block.key, block)
|
|
375
|
+
}
|
|
376
|
+
})
|
|
377
|
+
self.blockState.forEach((_, key) => {
|
|
378
|
+
if (!blocksPresent[key]) {
|
|
379
|
+
self.deleteBlock(key)
|
|
380
|
+
}
|
|
381
|
+
})
|
|
703
382
|
}),
|
|
704
383
|
)
|
|
705
|
-
|
|
706
|
-
return (
|
|
707
|
-
<>
|
|
708
|
-
{renderings.map(([block, rendering], index) => {
|
|
709
|
-
const { offsetPx, widthPx } = block
|
|
710
|
-
const offset = offsetPx - viewOffsetPx
|
|
711
|
-
const clipid = getId(id, index)
|
|
712
|
-
|
|
713
|
-
return (
|
|
714
|
-
<React.Fragment key={`frag-${index}`}>
|
|
715
|
-
<defs>
|
|
716
|
-
<clipPath id={clipid}>
|
|
717
|
-
<rect
|
|
718
|
-
x={0}
|
|
719
|
-
y={0}
|
|
720
|
-
width={widthPx}
|
|
721
|
-
height={overrideHeight || height}
|
|
722
|
-
/>
|
|
723
|
-
</clipPath>
|
|
724
|
-
</defs>
|
|
725
|
-
<g transform={`translate(${offset} 0)`}>
|
|
726
|
-
<g clipPath={`url(#${clipid})`}>
|
|
727
|
-
<ReactRendering rendering={rendering} />
|
|
728
|
-
</g>
|
|
729
|
-
</g>
|
|
730
|
-
</React.Fragment>
|
|
731
|
-
)
|
|
732
|
-
})}
|
|
733
|
-
</>
|
|
734
|
-
)
|
|
735
384
|
},
|
|
736
385
|
}))
|
|
737
386
|
.preProcessSnapshot(snap => {
|