@jbrowse/plugin-linear-genome-view 2.3.3 → 2.4.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/dist/BaseLinearDisplay/components/Block.js +1 -1
- package/dist/BaseLinearDisplay/components/Block.js.map +1 -1
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +11 -11
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +74 -4
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +41 -22
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/dist/BaseLinearDisplay/models/configSchema.js +8 -0
- package/dist/BaseLinearDisplay/models/configSchema.js.map +1 -1
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +1 -1
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +5 -0
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/dist/LinearBareDisplay/model.d.ts +62 -4
- package/dist/LinearBasicDisplay/model.d.ts +72 -14
- package/dist/LinearGenomeView/components/CenterLine.js +2 -2
- package/dist/LinearGenomeView/components/CenterLine.js.map +1 -1
- package/dist/LinearGenomeView/components/Cytobands.d.ts +118 -0
- package/dist/LinearGenomeView/components/Cytobands.js +92 -0
- package/dist/LinearGenomeView/components/Cytobands.js.map +1 -0
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +24 -3
- package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +4 -1
- package/dist/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/Gridlines.js +1 -1
- package/dist/LinearGenomeView/components/Gridlines.js.map +1 -1
- package/dist/LinearGenomeView/components/Header.js +3 -4
- package/dist/LinearGenomeView/components/Header.js.map +1 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.js +1 -1
- package/dist/LinearGenomeView/components/MiniControls.js +5 -4
- package/dist/LinearGenomeView/components/MiniControls.js.map +1 -1
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +1 -115
- package/dist/LinearGenomeView/components/OverviewScalebar.js +15 -99
- package/dist/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
- package/dist/LinearGenomeView/components/RubberbandSpan.js +2 -2
- package/dist/LinearGenomeView/components/RubberbandSpan.js.map +1 -1
- package/dist/LinearGenomeView/components/TrackLabel.js +6 -5
- package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -1
- package/dist/LinearGenomeView/components/ZoomControls.js +5 -4
- package/dist/LinearGenomeView/components/ZoomControls.js.map +1 -1
- package/dist/LinearGenomeView/components/util.d.ts +6 -0
- package/dist/LinearGenomeView/components/util.js +11 -1
- package/dist/LinearGenomeView/components/util.js.map +1 -1
- package/dist/LinearGenomeView/model.d.ts +10 -2
- package/dist/LinearGenomeView/model.js +6 -6
- package/dist/LinearGenomeView/model.js.map +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +6 -0
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +13 -0
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js.map +1 -0
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +10 -0
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +55 -0
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -0
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +13 -0
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +56 -0
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -0
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +8 -0
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +13 -0
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js.map +1 -0
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +8 -0
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +51 -0
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js.map +1 -0
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +8 -0
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +22 -0
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js.map +1 -0
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +8 -0
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +15 -0
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js.map +1 -0
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +23 -0
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +30 -0
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js.map +1 -0
- package/dist/LinearGenomeView/util.js +1 -1
- package/dist/LinearGenomeView/util.js.map +1 -1
- package/dist/index.d.ts +133 -18
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/esm/BaseLinearDisplay/components/Block.js +1 -1
- package/esm/BaseLinearDisplay/components/Block.js.map +1 -1
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +11 -11
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +74 -4
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +42 -23
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/esm/BaseLinearDisplay/models/configSchema.js +8 -0
- package/esm/BaseLinearDisplay/models/configSchema.js.map +1 -1
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +1 -1
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +5 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/esm/LinearBareDisplay/model.d.ts +62 -4
- package/esm/LinearBasicDisplay/model.d.ts +72 -14
- package/esm/LinearGenomeView/components/CenterLine.js +2 -2
- package/esm/LinearGenomeView/components/CenterLine.js.map +1 -1
- package/esm/LinearGenomeView/components/Cytobands.d.ts +118 -0
- package/esm/LinearGenomeView/components/Cytobands.js +87 -0
- package/esm/LinearGenomeView/components/Cytobands.js.map +1 -0
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +25 -4
- package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +4 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/Gridlines.js +1 -1
- package/esm/LinearGenomeView/components/Gridlines.js.map +1 -1
- package/esm/LinearGenomeView/components/Header.js +5 -6
- package/esm/LinearGenomeView/components/Header.js.map +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +5 -4
- package/esm/LinearGenomeView/components/MiniControls.js.map +1 -1
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +1 -115
- package/esm/LinearGenomeView/components/OverviewScalebar.js +12 -96
- package/esm/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
- package/esm/LinearGenomeView/components/RubberbandSpan.js +2 -2
- package/esm/LinearGenomeView/components/RubberbandSpan.js.map +1 -1
- package/esm/LinearGenomeView/components/TrackLabel.js +6 -5
- package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -1
- package/esm/LinearGenomeView/components/ZoomControls.js +5 -4
- package/esm/LinearGenomeView/components/ZoomControls.js.map +1 -1
- package/esm/LinearGenomeView/components/util.d.ts +6 -0
- package/esm/LinearGenomeView/components/util.js +9 -0
- package/esm/LinearGenomeView/components/util.js.map +1 -1
- package/esm/LinearGenomeView/model.d.ts +10 -2
- package/esm/LinearGenomeView/model.js +4 -4
- package/esm/LinearGenomeView/model.js.map +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +6 -0
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +7 -0
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js.map +1 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +10 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +49 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +13 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +47 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +7 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js.map +1 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +45 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js.map +1 -0
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +16 -0
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js.map +1 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +9 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js.map +1 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +23 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +24 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js.map +1 -0
- package/esm/LinearGenomeView/util.js +1 -1
- package/esm/LinearGenomeView/util.js.map +1 -1
- package/esm/index.d.ts +133 -18
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/BaseLinearDisplay/components/Block.tsx +1 -1
- package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +11 -12
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +53 -35
- package/src/BaseLinearDisplay/models/configSchema.ts +8 -0
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +9 -17
- package/src/LinearGenomeView/components/CenterLine.tsx +2 -2
- package/src/LinearGenomeView/components/Cytobands.tsx +154 -0
- package/src/LinearGenomeView/components/ExportSvgDialog.tsx +56 -4
- package/src/LinearGenomeView/components/GetSequenceDialog.tsx +5 -1
- package/src/LinearGenomeView/components/Gridlines.tsx +1 -1
- package/src/LinearGenomeView/components/Header.tsx +6 -13
- package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +8 -11
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +1 -1
- package/src/LinearGenomeView/components/MiniControls.tsx +6 -7
- package/src/LinearGenomeView/components/OverviewScalebar.tsx +218 -381
- package/src/LinearGenomeView/components/RubberbandSpan.tsx +2 -2
- package/src/LinearGenomeView/components/TrackLabel.tsx +3 -5
- package/src/LinearGenomeView/components/ZoomControls.tsx +3 -4
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +1240 -1203
- package/src/LinearGenomeView/components/util.ts +13 -0
- package/src/LinearGenomeView/index.test.ts +9 -5
- package/src/LinearGenomeView/model.ts +16 -5
- package/src/LinearGenomeView/svgcomponents/SVGBackground.tsx +21 -0
- package/src/LinearGenomeView/svgcomponents/SVGHeader.tsx +93 -0
- package/src/LinearGenomeView/svgcomponents/SVGLinearGenomeView.tsx +114 -0
- package/src/LinearGenomeView/svgcomponents/SVGRegionSeparators.tsx +31 -0
- package/src/LinearGenomeView/svgcomponents/SVGRuler.tsx +125 -0
- package/src/LinearGenomeView/svgcomponents/SVGScalebar.tsx +57 -0
- package/src/LinearGenomeView/svgcomponents/SVGTrackLabel.tsx +45 -0
- package/src/LinearGenomeView/svgcomponents/SVGTracks.tsx +67 -0
- package/src/LinearGenomeView/util.test.ts +7 -4
- package/src/LinearGenomeView/util.ts +2 -2
- package/src/index.ts +10 -1
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +0 -4
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +0 -141
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js.map +0 -1
- package/dist/LinearGenomeView/components/Ruler.d.ts +0 -11
- package/dist/LinearGenomeView/components/Ruler.js +0 -39
- package/dist/LinearGenomeView/components/Ruler.js.map +0 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +0 -4
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js +0 -134
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js.map +0 -1
- package/esm/LinearGenomeView/components/Ruler.d.ts +0 -11
- package/esm/LinearGenomeView/components/Ruler.js +0 -34
- package/esm/LinearGenomeView/components/Ruler.js.map +0 -1
- package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +0 -307
- package/src/LinearGenomeView/components/Ruler.tsx +0 -78
package/esm/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import Plugin from '@jbrowse/core/Plugin';
|
|
|
3
3
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
4
4
|
import { BaseLinearDisplay, BaseLinearDisplayComponent, BlockModel, BlockMsg, baseLinearDisplayConfigSchema } from './BaseLinearDisplay';
|
|
5
5
|
import { configSchemaFactory as linearBareDisplayConfigSchemaFactory } from './LinearBareDisplay';
|
|
6
|
-
import {
|
|
6
|
+
import { LinearGenomeViewModel, LinearGenomeViewStateModel, RefNameAutocomplete, SearchBox } from './LinearGenomeView';
|
|
7
|
+
import { renderToSvg, totalHeight, SVGTracks, SVGRuler } from './LinearGenomeView/svgcomponents/SVGLinearGenomeView';
|
|
7
8
|
import { configSchema as linearBasicDisplayConfigSchemaFactory, modelFactory as linearBasicDisplayModelFactory } from './LinearBasicDisplay';
|
|
8
9
|
export default class LinearGenomeViewPlugin extends Plugin {
|
|
9
10
|
name: string;
|
|
@@ -13,7 +14,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
13
14
|
id: string;
|
|
14
15
|
type: string;
|
|
15
16
|
rpcDriverName: string | undefined;
|
|
16
|
-
|
|
17
|
+
heightPreConfig: number | undefined;
|
|
17
18
|
blockState: import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IModelType<{
|
|
18
19
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
19
20
|
region: import("mobx-state-tree").IModelType<{
|
|
@@ -168,6 +169,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
168
169
|
estimatedRegionStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").Stats> | undefined;
|
|
169
170
|
estimatedRegionStats: import("@jbrowse/core/data_adapters/BaseAdapter").Stats | undefined;
|
|
170
171
|
} & {
|
|
172
|
+
readonly height: any;
|
|
171
173
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
172
174
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
173
175
|
} & {
|
|
@@ -197,7 +199,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
197
199
|
setRegionStatsP(p?: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").Stats> | undefined): void;
|
|
198
200
|
setRegionStats(estimatedRegionStats?: import("@jbrowse/core/data_adapters/BaseAdapter").Stats | undefined): void;
|
|
199
201
|
clearRegionStats(): void;
|
|
200
|
-
setHeight(displayHeight: number):
|
|
202
|
+
setHeight(displayHeight: number): any;
|
|
201
203
|
resizeHeight(distance: number): number;
|
|
202
204
|
setScrollTop(scrollTop: number): void;
|
|
203
205
|
updateStatsLimit(stats: import("@jbrowse/core/data_adapters/BaseAdapter").Stats): void;
|
|
@@ -230,13 +232,14 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
230
232
|
} & {
|
|
231
233
|
renderSvg(opts: import("./LinearGenomeView").ExportSvgOptions & {
|
|
232
234
|
overrideHeight: number;
|
|
235
|
+
theme: import("@mui/material").ThemeOptions;
|
|
233
236
|
}): Promise<JSX.Element>;
|
|
234
237
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
235
238
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
236
239
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
237
240
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
238
241
|
} & {
|
|
239
|
-
|
|
242
|
+
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
240
243
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
241
244
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
242
245
|
region: import("mobx-state-tree").IModelType<{
|
|
@@ -346,6 +349,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
346
349
|
estimatedRegionStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").Stats> | undefined;
|
|
347
350
|
estimatedRegionStats: import("@jbrowse/core/data_adapters/BaseAdapter").Stats | undefined;
|
|
348
351
|
} & {
|
|
352
|
+
readonly height: any;
|
|
349
353
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
350
354
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
351
355
|
} & {
|
|
@@ -375,7 +379,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
375
379
|
setRegionStatsP(p?: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").Stats> | undefined): void;
|
|
376
380
|
setRegionStats(estimatedRegionStats?: import("@jbrowse/core/data_adapters/BaseAdapter").Stats | undefined): void;
|
|
377
381
|
clearRegionStats(): void;
|
|
378
|
-
setHeight(displayHeight: number):
|
|
382
|
+
setHeight(displayHeight: number): any;
|
|
379
383
|
resizeHeight(distance: number): number;
|
|
380
384
|
setScrollTop(scrollTop: number): void;
|
|
381
385
|
updateStatsLimit(stats: import("@jbrowse/core/data_adapters/BaseAdapter").Stats): void;
|
|
@@ -408,12 +412,67 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
408
412
|
} & {
|
|
409
413
|
renderSvg(opts: import("./LinearGenomeView").ExportSvgOptions & {
|
|
410
414
|
overrideHeight: number;
|
|
415
|
+
theme: import("@mui/material").ThemeOptions;
|
|
411
416
|
}): Promise<JSX.Element>;
|
|
412
|
-
}, import("mobx-state-tree").
|
|
417
|
+
}, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
418
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
419
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
420
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
421
|
+
} & {
|
|
422
|
+
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
423
|
+
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
424
|
+
key: import("mobx-state-tree").ISimpleType<string>;
|
|
425
|
+
region: import("mobx-state-tree").IModelType<{
|
|
426
|
+
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
427
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
428
|
+
end: import("mobx-state-tree").ISimpleType<number>;
|
|
429
|
+
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
430
|
+
} & {
|
|
431
|
+
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
432
|
+
}, {
|
|
433
|
+
setRefName(newRefName: string): void;
|
|
434
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
435
|
+
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
436
|
+
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
437
|
+
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
438
|
+
}, {
|
|
439
|
+
renderInProgress: AbortController | undefined;
|
|
440
|
+
filled: boolean;
|
|
441
|
+
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
442
|
+
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
443
|
+
layout: any;
|
|
444
|
+
status: string;
|
|
445
|
+
error: unknown;
|
|
446
|
+
message: string | undefined;
|
|
447
|
+
maxHeightReached: boolean;
|
|
448
|
+
ReactComponent: ({ model, }: {
|
|
449
|
+
model: any;
|
|
450
|
+
}) => any;
|
|
451
|
+
renderProps: any;
|
|
452
|
+
} & {
|
|
453
|
+
doReload(): void;
|
|
454
|
+
afterAttach(): void;
|
|
455
|
+
setStatus(message: string): void;
|
|
456
|
+
setLoading(abortController: AbortController): void;
|
|
457
|
+
setMessage(messageText: string): void;
|
|
458
|
+
setRendered(props: {
|
|
459
|
+
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
460
|
+
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
461
|
+
layout: any;
|
|
462
|
+
maxHeightReached: boolean;
|
|
463
|
+
renderProps: any;
|
|
464
|
+
} | undefined): void;
|
|
465
|
+
setError(error: unknown): void;
|
|
466
|
+
reload(): void;
|
|
467
|
+
beforeDestroy(): void;
|
|
468
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
469
|
+
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
470
|
+
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
471
|
+
}>>, {
|
|
413
472
|
type: string;
|
|
414
|
-
height: number;
|
|
415
473
|
id: string;
|
|
416
474
|
rpcDriverName: string | undefined;
|
|
475
|
+
heightPreConfig: number | undefined;
|
|
417
476
|
userBpPerPxLimit: number | undefined;
|
|
418
477
|
userByteSizeLimit: number | undefined;
|
|
419
478
|
}>>;
|
|
@@ -424,7 +483,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
424
483
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
425
484
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
426
485
|
} & {
|
|
427
|
-
|
|
486
|
+
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
428
487
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
429
488
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
430
489
|
region: import("mobx-state-tree").IModelType<{
|
|
@@ -534,6 +593,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
534
593
|
estimatedRegionStatsP: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").Stats> | undefined;
|
|
535
594
|
estimatedRegionStats: import("@jbrowse/core/data_adapters/BaseAdapter").Stats | undefined;
|
|
536
595
|
} & {
|
|
596
|
+
readonly height: any;
|
|
537
597
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
538
598
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
539
599
|
} & {
|
|
@@ -563,7 +623,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
563
623
|
setRegionStatsP(p?: Promise<import("@jbrowse/core/data_adapters/BaseAdapter").Stats> | undefined): void;
|
|
564
624
|
setRegionStats(estimatedRegionStats?: import("@jbrowse/core/data_adapters/BaseAdapter").Stats | undefined): void;
|
|
565
625
|
clearRegionStats(): void;
|
|
566
|
-
setHeight(displayHeight: number):
|
|
626
|
+
setHeight(displayHeight: number): any;
|
|
567
627
|
resizeHeight(distance: number): number;
|
|
568
628
|
setScrollTop(scrollTop: number): void;
|
|
569
629
|
updateStatsLimit(stats: import("@jbrowse/core/data_adapters/BaseAdapter").Stats): void;
|
|
@@ -596,12 +656,67 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
596
656
|
} & {
|
|
597
657
|
renderSvg(opts: import("./LinearGenomeView").ExportSvgOptions & {
|
|
598
658
|
overrideHeight: number;
|
|
659
|
+
theme: import("@mui/material").ThemeOptions;
|
|
599
660
|
}): Promise<JSX.Element>;
|
|
600
|
-
}, import("mobx-state-tree").
|
|
661
|
+
}, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
662
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
663
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
664
|
+
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
665
|
+
} & {
|
|
666
|
+
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
667
|
+
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
668
|
+
key: import("mobx-state-tree").ISimpleType<string>;
|
|
669
|
+
region: import("mobx-state-tree").IModelType<{
|
|
670
|
+
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
671
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
672
|
+
end: import("mobx-state-tree").ISimpleType<number>;
|
|
673
|
+
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
674
|
+
} & {
|
|
675
|
+
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
676
|
+
}, {
|
|
677
|
+
setRefName(newRefName: string): void;
|
|
678
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
679
|
+
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
680
|
+
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
681
|
+
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
682
|
+
}, {
|
|
683
|
+
renderInProgress: AbortController | undefined;
|
|
684
|
+
filled: boolean;
|
|
685
|
+
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
686
|
+
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
687
|
+
layout: any;
|
|
688
|
+
status: string;
|
|
689
|
+
error: unknown;
|
|
690
|
+
message: string | undefined;
|
|
691
|
+
maxHeightReached: boolean;
|
|
692
|
+
ReactComponent: ({ model, }: {
|
|
693
|
+
model: any;
|
|
694
|
+
}) => any;
|
|
695
|
+
renderProps: any;
|
|
696
|
+
} & {
|
|
697
|
+
doReload(): void;
|
|
698
|
+
afterAttach(): void;
|
|
699
|
+
setStatus(message: string): void;
|
|
700
|
+
setLoading(abortController: AbortController): void;
|
|
701
|
+
setMessage(messageText: string): void;
|
|
702
|
+
setRendered(props: {
|
|
703
|
+
reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
704
|
+
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
705
|
+
layout: any;
|
|
706
|
+
maxHeightReached: boolean;
|
|
707
|
+
renderProps: any;
|
|
708
|
+
} | undefined): void;
|
|
709
|
+
setError(error: unknown): void;
|
|
710
|
+
reload(): void;
|
|
711
|
+
beforeDestroy(): void;
|
|
712
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
713
|
+
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
714
|
+
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
715
|
+
}>>, {
|
|
601
716
|
type: string;
|
|
602
|
-
height: number;
|
|
603
717
|
id: string;
|
|
604
718
|
rpcDriverName: string | undefined;
|
|
719
|
+
heightPreConfig: number | undefined;
|
|
605
720
|
userBpPerPxLimit: number | undefined;
|
|
606
721
|
userByteSizeLimit: number | undefined;
|
|
607
722
|
}>;
|
|
@@ -723,7 +838,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
723
838
|
moveTrack(movingId: string, targetId: string): void;
|
|
724
839
|
closeView(): void;
|
|
725
840
|
toggleTrack(trackId: string): void;
|
|
726
|
-
setTrackLabels(setting: "
|
|
841
|
+
setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
|
|
727
842
|
toggleCenterLine(): void;
|
|
728
843
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
729
844
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
@@ -915,7 +1030,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
915
1030
|
moveTrack(movingId: string, targetId: string): void;
|
|
916
1031
|
closeView(): void;
|
|
917
1032
|
toggleTrack(trackId: string): void;
|
|
918
|
-
setTrackLabels(setting: "
|
|
1033
|
+
setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
|
|
919
1034
|
toggleCenterLine(): void;
|
|
920
1035
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
921
1036
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
@@ -1117,7 +1232,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
1117
1232
|
moveTrack(movingId: string, targetId: string): void;
|
|
1118
1233
|
closeView(): void;
|
|
1119
1234
|
toggleTrack(trackId: string): void;
|
|
1120
|
-
setTrackLabels(setting: "
|
|
1235
|
+
setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
|
|
1121
1236
|
toggleCenterLine(): void;
|
|
1122
1237
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
1123
1238
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
@@ -1309,7 +1424,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
1309
1424
|
moveTrack(movingId: string, targetId: string): void;
|
|
1310
1425
|
closeView(): void;
|
|
1311
1426
|
toggleTrack(trackId: string): void;
|
|
1312
|
-
setTrackLabels(setting: "
|
|
1427
|
+
setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
|
|
1313
1428
|
toggleCenterLine(): void;
|
|
1314
1429
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
1315
1430
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
@@ -1511,7 +1626,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
1511
1626
|
moveTrack(movingId: string, targetId: string): void;
|
|
1512
1627
|
closeView(): void;
|
|
1513
1628
|
toggleTrack(trackId: string): void;
|
|
1514
|
-
setTrackLabels(setting: "
|
|
1629
|
+
setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
|
|
1515
1630
|
toggleCenterLine(): void;
|
|
1516
1631
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
1517
1632
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
@@ -1703,7 +1818,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
1703
1818
|
moveTrack(movingId: string, targetId: string): void;
|
|
1704
1819
|
closeView(): void;
|
|
1705
1820
|
toggleTrack(trackId: string): void;
|
|
1706
|
-
setTrackLabels(setting: "
|
|
1821
|
+
setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
|
|
1707
1822
|
toggleCenterLine(): void;
|
|
1708
1823
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
1709
1824
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
@@ -1793,6 +1908,6 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
1793
1908
|
install(pluginManager: PluginManager): void;
|
|
1794
1909
|
configure(pluginManager: PluginManager): void;
|
|
1795
1910
|
}
|
|
1796
|
-
export { baseLinearDisplayConfigSchema, linearBareDisplayConfigSchemaFactory, linearBasicDisplayConfigSchemaFactory, linearBasicDisplayModelFactory, renderToSvg, BaseLinearDisplayComponent, BaseLinearDisplay, RefNameAutocomplete, SearchBox, BlockMsg, };
|
|
1911
|
+
export { baseLinearDisplayConfigSchema, linearBareDisplayConfigSchemaFactory, linearBasicDisplayConfigSchemaFactory, linearBasicDisplayModelFactory, renderToSvg, totalHeight, SVGTracks, SVGRuler, BaseLinearDisplayComponent, BaseLinearDisplay, RefNameAutocomplete, SearchBox, BlockMsg, };
|
|
1797
1912
|
export type { LinearGenomeViewModel, LinearGenomeViewStateModel, BlockModel };
|
|
1798
1913
|
export type { BaseLinearDisplayModel } from './BaseLinearDisplay';
|
package/esm/index.js
CHANGED
|
@@ -5,7 +5,8 @@ import LineStyleIcon from '@mui/icons-material/LineStyle';
|
|
|
5
5
|
// locals
|
|
6
6
|
import { BaseLinearDisplay, BaseLinearDisplayComponent, BlockMsg, baseLinearDisplayConfigSchema, } from './BaseLinearDisplay';
|
|
7
7
|
import LinearBareDisplayF, { configSchemaFactory as linearBareDisplayConfigSchemaFactory, } from './LinearBareDisplay';
|
|
8
|
-
import LinearGenomeViewF, {
|
|
8
|
+
import LinearGenomeViewF, { RefNameAutocomplete, SearchBox, ZoomControls, LinearGenomeView, } from './LinearGenomeView';
|
|
9
|
+
import { renderToSvg, totalHeight, SVGTracks, SVGRuler, } from './LinearGenomeView/svgcomponents/SVGLinearGenomeView';
|
|
9
10
|
import LinearBasicDisplayF, { configSchema as linearBasicDisplayConfigSchemaFactory, modelFactory as linearBasicDisplayModelFactory, } from './LinearBasicDisplay';
|
|
10
11
|
import FeatureTrackF from './FeatureTrack';
|
|
11
12
|
import BasicTrackF from './BasicTrack';
|
|
@@ -43,5 +44,5 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
export { baseLinearDisplayConfigSchema, linearBareDisplayConfigSchemaFactory, linearBasicDisplayConfigSchemaFactory, linearBasicDisplayModelFactory, renderToSvg, BaseLinearDisplayComponent, BaseLinearDisplay, RefNameAutocomplete, SearchBox, BlockMsg, };
|
|
47
|
+
export { baseLinearDisplayConfigSchema, linearBareDisplayConfigSchemaFactory, linearBasicDisplayConfigSchemaFactory, linearBasicDisplayModelFactory, renderToSvg, totalHeight, SVGTracks, SVGRuler, BaseLinearDisplayComponent, BaseLinearDisplay, RefNameAutocomplete, SearchBox, BlockMsg, };
|
|
47
48
|
//# sourceMappingURL=index.js.map
|
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,EAE1B,QAAQ,EACR,6BAA6B,GAC9B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,kBAAkB,EAAE,EACzB,mBAAmB,IAAI,oCAAoC,GAC5D,MAAM,qBAAqB,CAAA;AAC5B,OAAO,iBAAiB,EAAE,
|
|
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,EAE1B,QAAQ,EACR,6BAA6B,GAC9B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,kBAAkB,EAAE,EACzB,mBAAmB,IAAI,oCAAoC,GAC5D,MAAM,qBAAqB,CAAA;AAC5B,OAAO,iBAAiB,EAAE,EAGxB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,GACT,MAAM,sDAAsD,CAAA;AAC7D,OAAO,mBAAmB,EAAE,EAC1B,YAAY,IAAI,qCAAqC,EACrD,YAAY,IAAI,8BAA8B,GAC/C,MAAM,sBAAsB,CAAA;AAE7B,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;AAED,OAAO,EACL,6BAA6B,EAC7B,oCAAoC,EACpC,qCAAqC,EACrC,8BAA8B,EAC9B,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,QAAQ,GACT,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.4.0",
|
|
4
4
|
"description": "JBrowse 2 linear genome view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"clsx": "^1.0.4",
|
|
48
48
|
"copy-to-clipboard": "^3.3.1",
|
|
49
49
|
"file-saver": "^2.0.0",
|
|
50
|
-
"material-ui-popup-state": "^
|
|
50
|
+
"material-ui-popup-state": "^5.0.0",
|
|
51
51
|
"normalize-wheel": "^1.0.1",
|
|
52
52
|
"react-error-boundary": "^3.0.0",
|
|
53
53
|
"react-popper": "^2.0.0"
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"module": "esm/index.js",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "78707a2bc3ba8489f26a590ef83f62ede945d048"
|
|
70
70
|
}
|
|
@@ -10,18 +10,17 @@ import RefreshIcon from '@mui/icons-material/Refresh'
|
|
|
10
10
|
// locals
|
|
11
11
|
import BlockMsg from './BlockMsg'
|
|
12
12
|
|
|
13
|
-
const useStyles = makeStyles()(theme =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}))
|
|
13
|
+
const useStyles = makeStyles()(theme => {
|
|
14
|
+
const bg = theme.palette.action.disabledBackground
|
|
15
|
+
return {
|
|
16
|
+
loading: {
|
|
17
|
+
paddingLeft: '0.6em',
|
|
18
|
+
backgroundColor: theme.palette.background.default,
|
|
19
|
+
backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 5px, ${bg} 5px, ${bg} 10px)`,
|
|
20
|
+
textAlign: 'center',
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
})
|
|
25
24
|
|
|
26
25
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
26
|
const LoadingMessage = observer(({ model }: { model: any }) => {
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
isSessionModelWithWidgets,
|
|
14
14
|
isFeature,
|
|
15
15
|
Feature,
|
|
16
|
+
ReactRendering,
|
|
16
17
|
} from '@jbrowse/core/util'
|
|
17
18
|
import { Stats } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
18
19
|
import { BaseBlock } from '@jbrowse/core/util/blockTypes'
|
|
@@ -33,6 +34,7 @@ import { LinearGenomeViewModel, ExportSvgOptions } from '../../LinearGenomeView'
|
|
|
33
34
|
import { Tooltip } from '../components/BaseLinearDisplay'
|
|
34
35
|
import TooLargeMessage from '../components/TooLargeMessage'
|
|
35
36
|
import BlockState, { renderBlockData } from './serverSideRenderedBlock'
|
|
37
|
+
import { ThemeOptions } from '@mui/material'
|
|
36
38
|
|
|
37
39
|
type LGV = LinearGenomeViewModel
|
|
38
40
|
|
|
@@ -65,7 +67,6 @@ function getDisplayStr(totalBytes: number) {
|
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
const minDisplayHeight = 20
|
|
68
|
-
const defaultDisplayHeight = 100
|
|
69
70
|
|
|
70
71
|
/**
|
|
71
72
|
* #stateModel BaseLinearDisplay
|
|
@@ -80,13 +81,12 @@ function stateModelFactory() {
|
|
|
80
81
|
/**
|
|
81
82
|
* #property
|
|
82
83
|
*/
|
|
83
|
-
|
|
84
|
+
heightPreConfig: types.maybe(
|
|
84
85
|
types.refinement(
|
|
85
86
|
'displayHeight',
|
|
86
87
|
types.number,
|
|
87
88
|
n => n >= minDisplayHeight,
|
|
88
89
|
),
|
|
89
|
-
defaultDisplayHeight,
|
|
90
90
|
),
|
|
91
91
|
/**
|
|
92
92
|
* #property
|
|
@@ -113,6 +113,9 @@ function stateModelFactory() {
|
|
|
113
113
|
estimatedRegionStats: undefined as undefined | Stats,
|
|
114
114
|
}))
|
|
115
115
|
.views(self => ({
|
|
116
|
+
get height() {
|
|
117
|
+
return self.heightPreConfig ?? getConf(self, 'height')
|
|
118
|
+
},
|
|
116
119
|
/**
|
|
117
120
|
* #getter
|
|
118
121
|
*/
|
|
@@ -365,9 +368,9 @@ function stateModelFactory() {
|
|
|
365
368
|
*/
|
|
366
369
|
setHeight(displayHeight: number) {
|
|
367
370
|
if (displayHeight > minDisplayHeight) {
|
|
368
|
-
self.
|
|
371
|
+
self.heightPreConfig = displayHeight
|
|
369
372
|
} else {
|
|
370
|
-
self.
|
|
373
|
+
self.heightPreConfig = minDisplayHeight
|
|
371
374
|
}
|
|
372
375
|
return self.height
|
|
373
376
|
},
|
|
@@ -657,7 +660,7 @@ function stateModelFactory() {
|
|
|
657
660
|
renderProps() {
|
|
658
661
|
const view = getContainingView(self) as LGV
|
|
659
662
|
return {
|
|
660
|
-
...
|
|
663
|
+
...getParentRenderProps(self),
|
|
661
664
|
notReady:
|
|
662
665
|
self.currBpPerPx !== view.bpPerPx || !self.estimatedRegionStats,
|
|
663
666
|
rpcDriverName: self.rpcDriverName,
|
|
@@ -706,14 +709,19 @@ function stateModelFactory() {
|
|
|
706
709
|
/**
|
|
707
710
|
* #method
|
|
708
711
|
*/
|
|
709
|
-
async renderSvg(
|
|
712
|
+
async renderSvg(
|
|
713
|
+
opts: ExportSvgOptions & {
|
|
714
|
+
overrideHeight: number
|
|
715
|
+
theme: ThemeOptions
|
|
716
|
+
},
|
|
717
|
+
) {
|
|
710
718
|
const { height, id } = self
|
|
711
719
|
const { overrideHeight } = opts
|
|
712
720
|
const view = getContainingView(self) as LGV
|
|
713
721
|
const { offsetPx: viewOffsetPx, roundedDynamicBlocks, width } = view
|
|
714
722
|
|
|
715
723
|
const renderings = await Promise.all(
|
|
716
|
-
roundedDynamicBlocks.map(block => {
|
|
724
|
+
roundedDynamicBlocks.map(async block => {
|
|
717
725
|
const blockState = BlockState.create({
|
|
718
726
|
key: block.key,
|
|
719
727
|
region: block,
|
|
@@ -726,34 +734,41 @@ function stateModelFactory() {
|
|
|
726
734
|
self.regionCannotBeRendered(block)
|
|
727
735
|
|
|
728
736
|
if (cannotBeRenderedReason) {
|
|
729
|
-
return
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
{
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
737
|
+
return [
|
|
738
|
+
block,
|
|
739
|
+
{
|
|
740
|
+
reactElement: (
|
|
741
|
+
<>
|
|
742
|
+
<rect x={0} y={0} width={width} height={20} fill="#aaa" />
|
|
743
|
+
<text x={0} y={15}>
|
|
744
|
+
{cannotBeRenderedReason}
|
|
745
|
+
</text>
|
|
746
|
+
</>
|
|
747
|
+
),
|
|
748
|
+
},
|
|
749
|
+
] as const
|
|
739
750
|
}
|
|
740
751
|
|
|
741
752
|
const { rpcManager, renderArgs, renderProps, rendererType } =
|
|
742
753
|
renderBlockData(blockState, self)
|
|
743
754
|
|
|
744
|
-
return
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
755
|
+
return [
|
|
756
|
+
block,
|
|
757
|
+
await rendererType.renderInClient(rpcManager, {
|
|
758
|
+
...renderArgs,
|
|
759
|
+
...renderProps,
|
|
760
|
+
viewParams: getViewParams(self, true),
|
|
761
|
+
exportSVG: opts,
|
|
762
|
+
theme: opts.theme || renderProps.theme,
|
|
763
|
+
}),
|
|
764
|
+
] as const
|
|
750
765
|
}),
|
|
751
766
|
)
|
|
752
767
|
|
|
753
768
|
return (
|
|
754
769
|
<>
|
|
755
|
-
{renderings.map((rendering, index) => {
|
|
756
|
-
const { offsetPx } =
|
|
770
|
+
{renderings.map(([block, rendering], index) => {
|
|
771
|
+
const { offsetPx, widthPx } = block
|
|
757
772
|
const offset = offsetPx - viewOffsetPx
|
|
758
773
|
const clipid = getId(id, index)
|
|
759
774
|
|
|
@@ -764,21 +779,14 @@ function stateModelFactory() {
|
|
|
764
779
|
<rect
|
|
765
780
|
x={0}
|
|
766
781
|
y={0}
|
|
767
|
-
width={
|
|
782
|
+
width={widthPx}
|
|
768
783
|
height={overrideHeight || height}
|
|
769
784
|
/>
|
|
770
785
|
</clipPath>
|
|
771
786
|
</defs>
|
|
772
787
|
<g transform={`translate(${offset} 0)`}>
|
|
773
788
|
<g clipPath={`url(#${clipid})`}>
|
|
774
|
-
{
|
|
775
|
-
rendering.reactElement
|
|
776
|
-
) : (
|
|
777
|
-
<g
|
|
778
|
-
/* eslint-disable-next-line react/no-danger */
|
|
779
|
-
dangerouslySetInnerHTML={{ __html: rendering.html }}
|
|
780
|
-
/>
|
|
781
|
-
)}
|
|
789
|
+
<ReactRendering rendering={rendering} />
|
|
782
790
|
</g>
|
|
783
791
|
</g>
|
|
784
792
|
</React.Fragment>
|
|
@@ -788,6 +796,16 @@ function stateModelFactory() {
|
|
|
788
796
|
)
|
|
789
797
|
},
|
|
790
798
|
}))
|
|
799
|
+
.preProcessSnapshot(snap => {
|
|
800
|
+
if (!snap) {
|
|
801
|
+
return snap
|
|
802
|
+
}
|
|
803
|
+
// rewrite "height" from older snapshots to "heightPreConfig", this allows
|
|
804
|
+
// us to maintain a height "getter" going forward
|
|
805
|
+
// @ts-ignore
|
|
806
|
+
const { height, ...rest } = snap
|
|
807
|
+
return { heightPreConfig: height, ...rest }
|
|
808
|
+
})
|
|
791
809
|
.postProcessSnapshot(self => {
|
|
792
810
|
// xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
|
|
793
811
|
const r = self as Omit<typeof self, symbol>
|
|
@@ -29,6 +29,14 @@ const baseLinearDisplayConfigSchema = ConfigurationSchema(
|
|
|
29
29
|
description:
|
|
30
30
|
"maximum data to attempt to download for a given track, used if adapter doesn't specify one",
|
|
31
31
|
},
|
|
32
|
+
/**
|
|
33
|
+
* #slot
|
|
34
|
+
*/
|
|
35
|
+
height: {
|
|
36
|
+
type: 'number',
|
|
37
|
+
defaultValue: 100,
|
|
38
|
+
description: 'default height for the track',
|
|
39
|
+
},
|
|
32
40
|
},
|
|
33
41
|
{
|
|
34
42
|
/**
|