@jbrowse/plugin-variants 1.6.5 → 1.6.6
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/LinearVariantDisplay/configSchema.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VcfAdapter/configSchema.d.ts +1 -1
- package/dist/VcfTabixAdapter/configSchema.d.ts +1 -1
- package/dist/plugin-variants.cjs.development.js +29 -19
- package/dist/plugin-variants.cjs.development.js.map +1 -1
- package/dist/plugin-variants.cjs.production.min.js +1 -1
- package/dist/plugin-variants.cjs.production.min.js.map +1 -1
- package/dist/plugin-variants.esm.js +29 -19
- package/dist/plugin-variants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/VariantFeatureWidget/BreakendOptionDialog.tsx +21 -23
- package/src/VariantFeatureWidget/VariantFeatureWidget.tsx +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-variants",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.6",
|
|
4
4
|
"description": "JBrowse 2 variant adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "9fcca7793af0df2d6e527ddaace2b368c8ed2879"
|
|
62
62
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import React, { useState } from 'react'
|
|
3
3
|
import { observer } from 'mobx-react'
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
5
4
|
import {
|
|
6
5
|
Button,
|
|
7
6
|
Dialog,
|
|
@@ -12,6 +11,7 @@ import {
|
|
|
12
11
|
IconButton,
|
|
13
12
|
FormControlLabel,
|
|
14
13
|
Checkbox,
|
|
14
|
+
makeStyles,
|
|
15
15
|
} from '@material-ui/core'
|
|
16
16
|
import CloseIcon from '@material-ui/icons/Close'
|
|
17
17
|
import { getSnapshot } from 'mobx-state-tree'
|
|
@@ -52,9 +52,7 @@ function BreakendOptionDialog({
|
|
|
52
52
|
{handleClose ? (
|
|
53
53
|
<IconButton
|
|
54
54
|
className={classes.closeButton}
|
|
55
|
-
onClick={() =>
|
|
56
|
-
handleClose()
|
|
57
|
-
}}
|
|
55
|
+
onClick={() => handleClose()}
|
|
58
56
|
>
|
|
59
57
|
<CloseIcon />
|
|
60
58
|
</IconButton>
|
|
@@ -90,22 +88,25 @@ function BreakendOptionDialog({
|
|
|
90
88
|
onClick={() => {
|
|
91
89
|
const { view } = model
|
|
92
90
|
const session = getSession(model)
|
|
91
|
+
try {
|
|
92
|
+
const viewSnapshot = viewType.snapshotFromBreakendFeature(
|
|
93
|
+
feature,
|
|
94
|
+
view,
|
|
95
|
+
)
|
|
96
|
+
viewSnapshot.views[0].offsetPx -= view.width / 2 + 100
|
|
97
|
+
viewSnapshot.views[1].offsetPx -= view.width / 2 + 100
|
|
98
|
+
viewSnapshot.featureData = feature
|
|
99
|
+
const viewTracks: any = getSnapshot(view.tracks)
|
|
100
|
+
viewSnapshot.views[0].tracks = viewTracks
|
|
101
|
+
viewSnapshot.views[1].tracks = mirrorTracks
|
|
102
|
+
? viewTracks.slice().reverse()
|
|
103
|
+
: viewTracks
|
|
93
104
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
viewSnapshot.views[1].offsetPx -= view.width / 2 + 100
|
|
100
|
-
viewSnapshot.featureData = feature
|
|
101
|
-
const viewTracks: any = getSnapshot(view.tracks)
|
|
102
|
-
viewSnapshot.views[0].tracks = viewTracks
|
|
103
|
-
viewSnapshot.views[1].tracks = mirrorTracks
|
|
104
|
-
? viewTracks.slice().reverse()
|
|
105
|
-
: viewTracks
|
|
106
|
-
|
|
107
|
-
session.addView('BreakpointSplitView', viewSnapshot)
|
|
108
|
-
|
|
105
|
+
session.addView('BreakpointSplitView', viewSnapshot)
|
|
106
|
+
} catch (e) {
|
|
107
|
+
console.error(e)
|
|
108
|
+
session.notify(`${e}`)
|
|
109
|
+
}
|
|
109
110
|
handleClose()
|
|
110
111
|
}}
|
|
111
112
|
variant="contained"
|
|
@@ -115,12 +116,9 @@ function BreakendOptionDialog({
|
|
|
115
116
|
OK
|
|
116
117
|
</Button>
|
|
117
118
|
<Button
|
|
118
|
-
onClick={() =>
|
|
119
|
-
handleClose()
|
|
120
|
-
}}
|
|
119
|
+
onClick={() => handleClose()}
|
|
121
120
|
color="secondary"
|
|
122
121
|
variant="contained"
|
|
123
|
-
autoFocus
|
|
124
122
|
>
|
|
125
123
|
Cancel
|
|
126
124
|
</Button>
|
|
@@ -146,13 +146,17 @@ function BreakendPanel(props: {
|
|
|
146
146
|
onClick={(event: any) => {
|
|
147
147
|
event.preventDefault()
|
|
148
148
|
const { view } = model
|
|
149
|
-
|
|
150
|
-
view
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
149
|
+
try {
|
|
150
|
+
if (view) {
|
|
151
|
+
view.navToLocString?.(locString)
|
|
152
|
+
} else {
|
|
153
|
+
throw new Error(
|
|
154
|
+
'No view associated with this feature detail panel anymore',
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
} catch (e) {
|
|
158
|
+
console.error(e)
|
|
159
|
+
session.notify(`${e}`)
|
|
156
160
|
}
|
|
157
161
|
}}
|
|
158
162
|
>
|