@jbrowse/plugin-linear-genome-view 1.6.4 → 1.6.5
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/LinearBlocks.d.ts +0 -5
- package/dist/LinearGenomeView/components/ScaleBar.d.ts +2 -0
- package/dist/LinearGenomeView/index.d.ts +1 -0
- package/dist/plugin-linear-genome-view.cjs.development.js +17 -19
- package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
- package/dist/plugin-linear-genome-view.esm.js +17 -19
- package/dist/plugin-linear-genome-view.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +1 -3
- package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -8
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +5 -2
- package/src/LinearGenomeView/components/TrackLabel.tsx +5 -5
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +15 -9
- package/src/LinearGenomeView/index.tsx +117 -116
|
@@ -7,11 +7,6 @@ declare const RenderedBlocks: ({ model }: {
|
|
|
7
7
|
declare function LinearBlocks({ model }: {
|
|
8
8
|
model: BaseLinearDisplayModel;
|
|
9
9
|
}): JSX.Element;
|
|
10
|
-
declare namespace LinearBlocks {
|
|
11
|
-
var propTypes: {
|
|
12
|
-
model: import("prop-types").Validator<any>;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
10
|
export { RenderedBlocks, useStyles };
|
|
16
11
|
declare const _default: typeof LinearBlocks;
|
|
17
12
|
export default _default;
|
|
@@ -171,6 +171,7 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
171
171
|
readonly cytobandOffset: number;
|
|
172
172
|
} & {
|
|
173
173
|
menuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
174
|
+
} & {
|
|
174
175
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
175
176
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
176
177
|
readonly roundedDynamicBlocks: {
|
|
@@ -367,6 +368,7 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
367
368
|
readonly cytobandOffset: number;
|
|
368
369
|
} & {
|
|
369
370
|
menuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
371
|
+
} & {
|
|
370
372
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
371
373
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
372
374
|
readonly roundedDynamicBlocks: {
|
|
@@ -259,6 +259,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
259
259
|
readonly cytobandOffset: number;
|
|
260
260
|
} & {
|
|
261
261
|
menuItems(): MenuItem[];
|
|
262
|
+
} & {
|
|
262
263
|
readonly staticBlocks: BlockSet;
|
|
263
264
|
readonly dynamicBlocks: BlockSet;
|
|
264
265
|
readonly roundedDynamicBlocks: {
|
|
@@ -1313,8 +1313,7 @@ var RenderedBlocks = /*#__PURE__*/mobxReact.observer(function (_ref) {
|
|
|
1313
1313
|
function LinearBlocks(_ref2) {
|
|
1314
1314
|
var model = _ref2.model;
|
|
1315
1315
|
var classes = useStyles$1();
|
|
1316
|
-
var blockDefinitions = model.blockDefinitions;
|
|
1317
|
-
|
|
1316
|
+
var blockDefinitions = model.blockDefinitions;
|
|
1318
1317
|
var viewModel = util.getContainingView(model);
|
|
1319
1318
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1320
1319
|
"data-testid": "Blockset",
|
|
@@ -1326,10 +1325,6 @@ function LinearBlocks(_ref2) {
|
|
|
1326
1325
|
model: model
|
|
1327
1326
|
}));
|
|
1328
1327
|
}
|
|
1329
|
-
|
|
1330
|
-
LinearBlocks.propTypes = {
|
|
1331
|
-
model: mobxReact.PropTypes.observableObject.isRequired
|
|
1332
|
-
};
|
|
1333
1328
|
var LinearBlocks$1 = /*#__PURE__*/mobxReact.observer(LinearBlocks);
|
|
1334
1329
|
|
|
1335
1330
|
function round(value) {
|
|
@@ -2332,9 +2327,10 @@ var BaseLinearDisplay$1 = /*#__PURE__*/mobxStateTree.types.compose('BaseLinearDi
|
|
|
2332
2327
|
case 0:
|
|
2333
2328
|
self.setError();
|
|
2334
2329
|
aborter = new AbortController();
|
|
2335
|
-
view = util.getContainingView(self);
|
|
2330
|
+
view = util.getContainingView(self); // extra check for contentBlocks.length
|
|
2331
|
+
// https://github.com/GMOD/jbrowse-components/issues/2694
|
|
2336
2332
|
|
|
2337
|
-
if (view.initialized) {
|
|
2333
|
+
if (!(!view.initialized || !view.staticBlocks.contentBlocks.length)) {
|
|
2338
2334
|
_context.next = 5;
|
|
2339
2335
|
break;
|
|
2340
2336
|
}
|
|
@@ -2385,7 +2381,7 @@ var BaseLinearDisplay$1 = /*#__PURE__*/mobxStateTree.types.compose('BaseLinearDi
|
|
|
2385
2381
|
afterAttach: function afterAttach() {
|
|
2386
2382
|
// this autorun performs stats estimation
|
|
2387
2383
|
//
|
|
2388
|
-
// the chain of events calls
|
|
2384
|
+
// the chain of events calls estimateRegionsStats against the data
|
|
2389
2385
|
// adapter which by default uses featureDensity, but can also respond
|
|
2390
2386
|
// with a byte size estimate and fetch size limit (data adapter can
|
|
2391
2387
|
// define what is too much data)
|
|
@@ -4682,7 +4678,9 @@ var TrackLabel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
4682
4678
|
handleClose();
|
|
4683
4679
|
}
|
|
4684
4680
|
|
|
4685
|
-
var items = track.trackMenuItems()
|
|
4681
|
+
var items = [].concat(_toConsumableArray((_session$getTrackActi = session.getTrackActionMenuItems) === null || _session$getTrackActi === void 0 ? void 0 : _session$getTrackActi.call(session, trackConf)), _toConsumableArray(track.trackMenuItems())).sort(function (a, b) {
|
|
4682
|
+
return (b.priority || 0) - (a.priority || 0);
|
|
4683
|
+
});
|
|
4686
4684
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(core.Paper, {
|
|
4687
4685
|
ref: ref,
|
|
4688
4686
|
className: clsx(className, classes.root)
|
|
@@ -4718,9 +4716,7 @@ var TrackLabel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
4718
4716
|
onMenuItemClick: handleMenuItemClick,
|
|
4719
4717
|
open: Boolean(anchorEl),
|
|
4720
4718
|
onClose: handleClose,
|
|
4721
|
-
menuItems:
|
|
4722
|
-
return (b.priority || 0) - (a.priority || 0);
|
|
4723
|
-
})
|
|
4719
|
+
menuItems: items
|
|
4724
4720
|
}));
|
|
4725
4721
|
});
|
|
4726
4722
|
var TrackLabel$1 = /*#__PURE__*/mobxReact.observer(TrackLabel);
|
|
@@ -6489,11 +6485,11 @@ function stateModelFactory$1(pluginManager) {
|
|
|
6489
6485
|
}),
|
|
6490
6486
|
showCenterLine: mobxStateTree.types.optional(mobxStateTree.types["boolean"], function () {
|
|
6491
6487
|
var setting = localStorageGetItem('lgv-showCenterLine');
|
|
6492
|
-
return setting !== undefined ?
|
|
6488
|
+
return setting !== undefined && setting !== null ? !!+setting : false;
|
|
6493
6489
|
}),
|
|
6494
6490
|
showCytobandsSetting: mobxStateTree.types.optional(mobxStateTree.types["boolean"], function () {
|
|
6495
6491
|
var setting = localStorageGetItem('lgv-showCytobands');
|
|
6496
|
-
return setting !== undefined ?
|
|
6492
|
+
return setting !== undefined && setting !== null ? !!+setting : true;
|
|
6497
6493
|
})
|
|
6498
6494
|
}))["volatile"](function () {
|
|
6499
6495
|
return {
|
|
@@ -7542,8 +7538,6 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7542
7538
|
|
|
7543
7539
|
};
|
|
7544
7540
|
}).views(function (self) {
|
|
7545
|
-
var currentlyCalculatedStaticBlocks;
|
|
7546
|
-
var stringifiedCurrentlyCalculatedStaticBlocks = '';
|
|
7547
7541
|
return {
|
|
7548
7542
|
menuItems: function menuItems() {
|
|
7549
7543
|
var canShowCytobands = self.canShowCytobands,
|
|
@@ -7666,8 +7660,12 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7666
7660
|
}
|
|
7667
7661
|
|
|
7668
7662
|
return menuItems;
|
|
7669
|
-
}
|
|
7670
|
-
|
|
7663
|
+
}
|
|
7664
|
+
};
|
|
7665
|
+
}).views(function (self) {
|
|
7666
|
+
var currentlyCalculatedStaticBlocks;
|
|
7667
|
+
var stringifiedCurrentlyCalculatedStaticBlocks = '';
|
|
7668
|
+
return {
|
|
7671
7669
|
get staticBlocks() {
|
|
7672
7670
|
var ret = calculateStaticBlocks(self);
|
|
7673
7671
|
var sret = JSON.stringify(ret);
|