@jbrowse/product-core 3.2.0 → 3.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/Session/MultipleViews.d.ts +1671 -8
- package/dist/Session/MultipleViews.js +1 -24
- package/dist/Session/SessionTracks.d.ts +1671 -1
- package/dist/Session/Tracks.d.ts +1671 -1
- package/esm/Session/MultipleViews.d.ts +1671 -8
- package/esm/Session/MultipleViews.js +2 -25
- package/esm/Session/SessionTracks.d.ts +1671 -1
- package/esm/Session/Tracks.d.ts +1671 -1
- package/package.json +5 -5
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MultipleViewsSessionMixin = MultipleViewsSessionMixin;
|
|
4
4
|
exports.isSessionWithMultipleViews = isSessionWithMultipleViews;
|
|
5
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
5
|
const util_1 = require("@jbrowse/core/util");
|
|
7
6
|
const mobx_1 = require("mobx");
|
|
8
7
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
8
|
const BaseSession_1 = require("./BaseSession");
|
|
10
9
|
const DrawerWidgets_1 = require("./DrawerWidgets");
|
|
11
|
-
function localStorageSetBoolean(key, value) {
|
|
12
|
-
(0, util_1.localStorageSetItem)(key, JSON.stringify(value));
|
|
13
|
-
}
|
|
14
10
|
function MultipleViewsSessionMixin(pluginManager) {
|
|
15
11
|
return mobx_state_tree_1.types
|
|
16
12
|
.compose((0, BaseSession_1.BaseSessionModel)(pluginManager), (0, DrawerWidgets_1.DrawerWidgetSessionMixin)(pluginManager))
|
|
@@ -64,31 +60,12 @@ function MultipleViewsSessionMixin(pluginManager) {
|
|
|
64
60
|
}
|
|
65
61
|
self.views.remove(view);
|
|
66
62
|
},
|
|
67
|
-
addLinearGenomeViewOfAssembly(assemblyName, initialState = {}) {
|
|
68
|
-
return this.addViewOfAssembly('LinearGenomeView', assemblyName, initialState);
|
|
69
|
-
},
|
|
70
|
-
addViewOfAssembly(viewType, assemblyName, initialState = {}) {
|
|
71
|
-
const asm = self.assemblies.find(s => (0, configuration_1.readConfObject)(s, 'name') === assemblyName);
|
|
72
|
-
if (!asm) {
|
|
73
|
-
throw new Error(`Could not add view of assembly "${assemblyName}", assembly name not found`);
|
|
74
|
-
}
|
|
75
|
-
return this.addView(viewType, {
|
|
76
|
-
...initialState,
|
|
77
|
-
displayRegionsFromAssemblyName: (0, configuration_1.readConfObject)(asm, 'name'),
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
addViewFromAnotherView(viewType, otherView, initialState = {}) {
|
|
81
|
-
const state = { ...initialState };
|
|
82
|
-
state.displayedRegions = (0, mobx_state_tree_1.getSnapshot)(otherView.displayedRegions);
|
|
83
|
-
return this.addView(viewType, state);
|
|
84
|
-
},
|
|
85
63
|
setStickyViewHeaders(sticky) {
|
|
86
64
|
self.stickyViewHeaders = sticky;
|
|
87
|
-
localStorageSetBoolean('stickyViewHeaders', sticky);
|
|
88
65
|
},
|
|
89
66
|
afterAttach() {
|
|
90
67
|
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(() => {
|
|
91
|
-
localStorageSetBoolean('stickyViewHeaders', self.stickyViewHeaders);
|
|
68
|
+
(0, util_1.localStorageSetBoolean)('stickyViewHeaders', self.stickyViewHeaders);
|
|
92
69
|
}));
|
|
93
70
|
},
|
|
94
71
|
}));
|