@jbrowse/plugin-alignments 3.0.4 → 3.0.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.
@@ -40,7 +40,9 @@ function doAfterAttach(model) {
40
40
  layoutId: (0, util_1.getContainingTrack)(model).id,
41
41
  timeout: 1000000,
42
42
  statusCallback: (arg) => {
43
- model.setMessage(arg);
43
+ if ((0, mobx_state_tree_1.isAlive)(model)) {
44
+ model.setMessage(arg);
45
+ }
44
46
  },
45
47
  ...model.renderPropsPre(),
46
48
  });
@@ -1,7 +1,7 @@
1
+ import { type IAnyStateTreeNode } from 'mobx-state-tree';
1
2
  import type { ModificationType } from './types';
2
3
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
4
  import type { BlockSet } from '@jbrowse/core/util/blockTypes';
4
- import type { IAnyStateTreeNode } from 'mobx-state-tree';
5
5
  export interface ModificationOpts {
6
6
  headers?: Record<string, string>;
7
7
  stopToken?: string;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getUniqueModifications = getUniqueModifications;
4
4
  const util_1 = require("@jbrowse/core/util");
5
5
  const tracks_1 = require("@jbrowse/core/util/tracks");
6
+ const mobx_state_tree_1 = require("mobx-state-tree");
6
7
  async function getUniqueModifications({ model, adapterConfig, blocks, opts, }) {
7
8
  const { rpcManager } = (0, util_1.getSession)(model);
8
9
  const sessionId = (0, tracks_1.getRpcSessionId)(model);
@@ -11,7 +12,9 @@ async function getUniqueModifications({ model, adapterConfig, blocks, opts, }) {
11
12
  sessionId,
12
13
  regions: blocks.contentBlocks,
13
14
  statusCallback: (arg) => {
14
- model.setMessage(arg);
15
+ if ((0, mobx_state_tree_1.isAlive)(model)) {
16
+ model.setMessage(arg);
17
+ }
15
18
  },
16
19
  ...opts,
17
20
  });
@@ -37,7 +37,9 @@ export function doAfterAttach(model) {
37
37
  layoutId: getContainingTrack(model).id,
38
38
  timeout: 1000000,
39
39
  statusCallback: (arg) => {
40
- model.setMessage(arg);
40
+ if (isAlive(model)) {
41
+ model.setMessage(arg);
42
+ }
41
43
  },
42
44
  ...model.renderPropsPre(),
43
45
  });
@@ -1,7 +1,7 @@
1
+ import { type IAnyStateTreeNode } from 'mobx-state-tree';
1
2
  import type { ModificationType } from './types';
2
3
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
4
  import type { BlockSet } from '@jbrowse/core/util/blockTypes';
4
- import type { IAnyStateTreeNode } from 'mobx-state-tree';
5
5
  export interface ModificationOpts {
6
6
  headers?: Record<string, string>;
7
7
  stopToken?: string;
@@ -1,5 +1,6 @@
1
1
  import { getSession } from '@jbrowse/core/util';
2
2
  import { getRpcSessionId } from '@jbrowse/core/util/tracks';
3
+ import { isAlive } from 'mobx-state-tree';
3
4
  export async function getUniqueModifications({ model, adapterConfig, blocks, opts, }) {
4
5
  const { rpcManager } = getSession(model);
5
6
  const sessionId = getRpcSessionId(model);
@@ -8,7 +9,9 @@ export async function getUniqueModifications({ model, adapterConfig, blocks, opt
8
9
  sessionId,
9
10
  regions: blocks.contentBlocks,
10
11
  statusCallback: (arg) => {
11
- model.setMessage(arg);
12
+ if (isAlive(model)) {
13
+ model.setMessage(arg);
14
+ }
12
15
  },
13
16
  ...opts,
14
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-alignments",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "JBrowse 2 alignments adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -38,10 +38,10 @@
38
38
  "dependencies": {
39
39
  "@gmod/bam": "^5.0.0",
40
40
  "@gmod/cram": "^4.0.1",
41
- "@jbrowse/core": "^3.0.4",
42
- "@jbrowse/plugin-linear-genome-view": "^3.0.4",
43
- "@jbrowse/plugin-wiggle": "^3.0.4",
44
- "@jbrowse/sv-core": "^3.0.4",
41
+ "@jbrowse/core": "^3.0.5",
42
+ "@jbrowse/plugin-linear-genome-view": "^3.0.5",
43
+ "@jbrowse/plugin-wiggle": "^3.0.5",
44
+ "@jbrowse/sv-core": "^3.0.5",
45
45
  "@mui/icons-material": "^6.0.0",
46
46
  "@mui/material": "^6.0.0",
47
47
  "canvas2svg": "^1.0.16",
@@ -63,5 +63,5 @@
63
63
  "distModule": "esm/index.js",
64
64
  "srcModule": "src/index.ts",
65
65
  "module": "esm/index.js",
66
- "gitHead": "61e6d26f83acbf58a946c2add3415bc46b878df9"
66
+ "gitHead": "a03749efe19e51609922272b845a331897346789"
67
67
  }