@jbrowse/plugin-circular-view 3.1.0 → 3.3.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/CircularView/components/ImportForm.js +1 -1
- package/dist/CircularView/model.js +9 -7
- package/dist/LaunchCircularView/index.js +2 -2
- package/esm/CircularView/components/ImportForm.js +2 -2
- package/esm/CircularView/model.js +9 -7
- package/esm/LaunchCircularView/index.js +2 -2
- package/package.json +5 -5
|
@@ -24,7 +24,7 @@ const ImportForm = (0, mobx_react_1.observer)(function ({ model }) {
|
|
|
24
24
|
: 'No configured assemblies';
|
|
25
25
|
const regions = (assembly === null || assembly === void 0 ? void 0 : assembly.regions) || [];
|
|
26
26
|
const err = assemblyError || error;
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { className: classes.importFormContainer, children: [err ? ((0, jsx_runtime_1.jsx)(material_1.
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { className: classes.importFormContainer, children: [err ? ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", children: (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: err }) })) : null, (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { onChange: val => {
|
|
28
28
|
model.setError(undefined);
|
|
29
29
|
setSelectedAsm(val);
|
|
30
30
|
}, session: session, selected: selectedAsm }), (0, jsx_runtime_1.jsx)(material_1.Button, { disabled: !regions.length, onClick: () => {
|
|
@@ -152,7 +152,7 @@ function stateModelFactory(pluginManager) {
|
|
|
152
152
|
},
|
|
153
153
|
get elidedRegions() {
|
|
154
154
|
const visible = [];
|
|
155
|
-
self.displayedRegions
|
|
155
|
+
for (const region of self.displayedRegions) {
|
|
156
156
|
const widthBp = region.end - region.start;
|
|
157
157
|
const widthPx = widthBp / self.bpPerPx;
|
|
158
158
|
if (widthPx < self.minVisibleWidth) {
|
|
@@ -172,7 +172,7 @@ function stateModelFactory(pluginManager) {
|
|
|
172
172
|
else {
|
|
173
173
|
visible.push({ ...region, widthBp, elided: false });
|
|
174
174
|
}
|
|
175
|
-
}
|
|
175
|
+
}
|
|
176
176
|
for (let i = 0; i < visible.length; i += 1) {
|
|
177
177
|
const v = visible[i];
|
|
178
178
|
if (v.elided && v.regions.length === 1) {
|
|
@@ -183,11 +183,11 @@ function stateModelFactory(pluginManager) {
|
|
|
183
183
|
},
|
|
184
184
|
get assemblyNames() {
|
|
185
185
|
const assemblyNames = [];
|
|
186
|
-
self.displayedRegions
|
|
186
|
+
for (const displayedRegion of self.displayedRegions) {
|
|
187
187
|
if (!assemblyNames.includes(displayedRegion.assemblyName)) {
|
|
188
188
|
assemblyNames.push(displayedRegion.assemblyName);
|
|
189
189
|
}
|
|
190
|
-
}
|
|
190
|
+
}
|
|
191
191
|
return assemblyNames;
|
|
192
192
|
},
|
|
193
193
|
get initialized() {
|
|
@@ -324,11 +324,13 @@ function stateModelFactory(pluginManager) {
|
|
|
324
324
|
hideTrack(trackId) {
|
|
325
325
|
const schema = pluginManager.pluggableConfigSchemaType('track');
|
|
326
326
|
const conf = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), trackId);
|
|
327
|
-
const
|
|
327
|
+
const tracks = self.tracks.filter(t => t.configuration === conf);
|
|
328
328
|
(0, mobx_1.transaction)(() => {
|
|
329
|
-
|
|
329
|
+
for (const track of tracks) {
|
|
330
|
+
self.tracks.remove(track);
|
|
331
|
+
}
|
|
330
332
|
});
|
|
331
|
-
return
|
|
333
|
+
return tracks.length;
|
|
332
334
|
},
|
|
333
335
|
toggleFitToWindowLock() {
|
|
334
336
|
self.lockedFitToWindow = !self.lockedFitToWindow;
|
|
@@ -15,8 +15,8 @@ function LaunchCircularViewF(pluginManager) {
|
|
|
15
15
|
throw new Error(`Assembly "${assembly}" not found when launching circular genome view`);
|
|
16
16
|
}
|
|
17
17
|
view.setDisplayedRegions(asm.regions || []);
|
|
18
|
-
|
|
18
|
+
for (const track of tracks) {
|
|
19
19
|
view.showTrack(track);
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { AssemblySelector, ErrorMessage } from '@jbrowse/core/ui';
|
|
4
4
|
import { getSession } from '@jbrowse/core/util';
|
|
5
|
-
import { Button, Container,
|
|
5
|
+
import { Button, Container, Grid } from '@mui/material';
|
|
6
6
|
import { observer } from 'mobx-react';
|
|
7
7
|
import { makeStyles } from 'tss-react/mui';
|
|
8
8
|
const useStyles = makeStyles()(theme => ({
|
|
@@ -22,7 +22,7 @@ const ImportForm = observer(function ({ model }) {
|
|
|
22
22
|
: 'No configured assemblies';
|
|
23
23
|
const regions = (assembly === null || assembly === void 0 ? void 0 : assembly.regions) || [];
|
|
24
24
|
const err = assemblyError || error;
|
|
25
|
-
return (_jsxs(Container, { className: classes.importFormContainer, children: [err ? (_jsx(
|
|
25
|
+
return (_jsxs(Container, { className: classes.importFormContainer, children: [err ? (_jsx(Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", children: _jsx(ErrorMessage, { error: err }) })) : null, _jsxs(Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center", children: [_jsx(AssemblySelector, { onChange: val => {
|
|
26
26
|
model.setError(undefined);
|
|
27
27
|
setSelectedAsm(val);
|
|
28
28
|
}, session: session, selected: selectedAsm }), _jsx(Button, { disabled: !regions.length, onClick: () => {
|
|
@@ -114,7 +114,7 @@ function stateModelFactory(pluginManager) {
|
|
|
114
114
|
},
|
|
115
115
|
get elidedRegions() {
|
|
116
116
|
const visible = [];
|
|
117
|
-
self.displayedRegions
|
|
117
|
+
for (const region of self.displayedRegions) {
|
|
118
118
|
const widthBp = region.end - region.start;
|
|
119
119
|
const widthPx = widthBp / self.bpPerPx;
|
|
120
120
|
if (widthPx < self.minVisibleWidth) {
|
|
@@ -134,7 +134,7 @@ function stateModelFactory(pluginManager) {
|
|
|
134
134
|
else {
|
|
135
135
|
visible.push({ ...region, widthBp, elided: false });
|
|
136
136
|
}
|
|
137
|
-
}
|
|
137
|
+
}
|
|
138
138
|
for (let i = 0; i < visible.length; i += 1) {
|
|
139
139
|
const v = visible[i];
|
|
140
140
|
if (v.elided && v.regions.length === 1) {
|
|
@@ -145,11 +145,11 @@ function stateModelFactory(pluginManager) {
|
|
|
145
145
|
},
|
|
146
146
|
get assemblyNames() {
|
|
147
147
|
const assemblyNames = [];
|
|
148
|
-
self.displayedRegions
|
|
148
|
+
for (const displayedRegion of self.displayedRegions) {
|
|
149
149
|
if (!assemblyNames.includes(displayedRegion.assemblyName)) {
|
|
150
150
|
assemblyNames.push(displayedRegion.assemblyName);
|
|
151
151
|
}
|
|
152
|
-
}
|
|
152
|
+
}
|
|
153
153
|
return assemblyNames;
|
|
154
154
|
},
|
|
155
155
|
get initialized() {
|
|
@@ -286,11 +286,13 @@ function stateModelFactory(pluginManager) {
|
|
|
286
286
|
hideTrack(trackId) {
|
|
287
287
|
const schema = pluginManager.pluggableConfigSchemaType('track');
|
|
288
288
|
const conf = resolveIdentifier(schema, getRoot(self), trackId);
|
|
289
|
-
const
|
|
289
|
+
const tracks = self.tracks.filter(t => t.configuration === conf);
|
|
290
290
|
transaction(() => {
|
|
291
|
-
|
|
291
|
+
for (const track of tracks) {
|
|
292
|
+
self.tracks.remove(track);
|
|
293
|
+
}
|
|
292
294
|
});
|
|
293
|
-
return
|
|
295
|
+
return tracks.length;
|
|
294
296
|
},
|
|
295
297
|
toggleFitToWindowLock() {
|
|
296
298
|
self.lockedFitToWindow = !self.lockedFitToWindow;
|
|
@@ -12,8 +12,8 @@ export default function LaunchCircularViewF(pluginManager) {
|
|
|
12
12
|
throw new Error(`Assembly "${assembly}" not found when launching circular genome view`);
|
|
13
13
|
}
|
|
14
14
|
view.setDisplayedRegions(asm.regions || []);
|
|
15
|
-
|
|
15
|
+
for (const track of tracks) {
|
|
16
16
|
view.showTrack(track);
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
});
|
|
19
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-circular-view",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "JBrowse 2 circular view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@jbrowse/core": "^3.
|
|
40
|
-
"@mui/icons-material": "^
|
|
41
|
-
"@mui/material": "^
|
|
39
|
+
"@jbrowse/core": "^3.3.0",
|
|
40
|
+
"@mui/icons-material": "^7.0.0",
|
|
41
|
+
"@mui/material": "^7.0.0",
|
|
42
42
|
"@types/file-saver": "^2.0.0",
|
|
43
43
|
"file-saver": "^2.0.0",
|
|
44
44
|
"mobx": "^6.0.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"distModule": "esm/index.js",
|
|
57
57
|
"srcModule": "src/index.ts",
|
|
58
58
|
"module": "esm/index.js",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "0bb64d8cc7ecdd167515308b31eec3d9acbc59e4"
|
|
60
60
|
}
|