@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.
@@ -1,12 +1,8 @@
1
- import { readConfObject } from '@jbrowse/core/configuration';
2
- import { localStorageGetBoolean, localStorageSetItem } from '@jbrowse/core/util';
1
+ import { localStorageGetBoolean, localStorageSetBoolean, } from '@jbrowse/core/util';
3
2
  import { autorun } from 'mobx';
4
- import { addDisposer, cast, getSnapshot, types } from 'mobx-state-tree';
3
+ import { addDisposer, cast, types } from 'mobx-state-tree';
5
4
  import { BaseSessionModel, isBaseSession } from './BaseSession';
6
5
  import { DrawerWidgetSessionMixin } from './DrawerWidgets';
7
- function localStorageSetBoolean(key, value) {
8
- localStorageSetItem(key, JSON.stringify(value));
9
- }
10
6
  export function MultipleViewsSessionMixin(pluginManager) {
11
7
  return types
12
8
  .compose(BaseSessionModel(pluginManager), DrawerWidgetSessionMixin(pluginManager))
@@ -60,27 +56,8 @@ export function MultipleViewsSessionMixin(pluginManager) {
60
56
  }
61
57
  self.views.remove(view);
62
58
  },
63
- addLinearGenomeViewOfAssembly(assemblyName, initialState = {}) {
64
- return this.addViewOfAssembly('LinearGenomeView', assemblyName, initialState);
65
- },
66
- addViewOfAssembly(viewType, assemblyName, initialState = {}) {
67
- const asm = self.assemblies.find(s => readConfObject(s, 'name') === assemblyName);
68
- if (!asm) {
69
- throw new Error(`Could not add view of assembly "${assemblyName}", assembly name not found`);
70
- }
71
- return this.addView(viewType, {
72
- ...initialState,
73
- displayRegionsFromAssemblyName: readConfObject(asm, 'name'),
74
- });
75
- },
76
- addViewFromAnotherView(viewType, otherView, initialState = {}) {
77
- const state = { ...initialState };
78
- state.displayedRegions = getSnapshot(otherView.displayedRegions);
79
- return this.addView(viewType, state);
80
- },
81
59
  setStickyViewHeaders(sticky) {
82
60
  self.stickyViewHeaders = sticky;
83
- localStorageSetBoolean('stickyViewHeaders', sticky);
84
61
  },
85
62
  afterAttach() {
86
63
  addDisposer(self, autorun(() => {