@jbrowse/app-core 2.11.0 → 2.11.2
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/ui/App/Drawer.js
CHANGED
|
@@ -35,6 +35,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
35
35
|
paper: {
|
|
36
36
|
overflowY: 'auto',
|
|
37
37
|
height: '100%',
|
|
38
|
+
position: 'relative',
|
|
38
39
|
zIndex: theme.zIndex.drawer,
|
|
39
40
|
outline: 'none',
|
|
40
41
|
background: theme.palette.background.default,
|
|
@@ -53,13 +54,11 @@ const Drawer = (0, mobx_react_1.observer)(function ({ children, session, }) {
|
|
|
53
54
|
(0, react_1.useEffect)(() => {
|
|
54
55
|
function handleSelectView(e) {
|
|
55
56
|
var _a, _b, _c;
|
|
56
|
-
if (e.target instanceof Element) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
session.setFocusedViewId(visibleWidgetId);
|
|
62
|
-
}
|
|
57
|
+
if (e.target instanceof Element && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
const visibleWidgetId = (_c = (_b = session.visibleWidget) === null || _b === void 0 ? void 0 : _b.view) === null || _c === void 0 ? void 0 : _c.id;
|
|
60
|
+
if (visibleWidgetId) {
|
|
61
|
+
session.setFocusedViewId(visibleWidgetId);
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
}
|
|
@@ -54,10 +54,8 @@ const ViewContainer = (0, mobx_react_1.observer)(function ({ view, onClose, onMi
|
|
|
54
54
|
(0, react_1.useEffect)(() => {
|
|
55
55
|
function handleSelectView(e) {
|
|
56
56
|
var _a;
|
|
57
|
-
if (e.target instanceof Element) {
|
|
58
|
-
|
|
59
|
-
session.setFocusedViewId(view.id);
|
|
60
|
-
}
|
|
57
|
+
if (e.target instanceof Element && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
58
|
+
session.setFocusedViewId(view.id);
|
|
61
59
|
}
|
|
62
60
|
}
|
|
63
61
|
document.addEventListener('mousedown', handleSelectView);
|
package/esm/ui/App/Drawer.js
CHANGED
|
@@ -7,6 +7,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
7
7
|
paper: {
|
|
8
8
|
overflowY: 'auto',
|
|
9
9
|
height: '100%',
|
|
10
|
+
position: 'relative',
|
|
10
11
|
zIndex: theme.zIndex.drawer,
|
|
11
12
|
outline: 'none',
|
|
12
13
|
background: theme.palette.background.default,
|
|
@@ -25,13 +26,11 @@ const Drawer = observer(function ({ children, session, }) {
|
|
|
25
26
|
useEffect(() => {
|
|
26
27
|
function handleSelectView(e) {
|
|
27
28
|
var _a, _b, _c;
|
|
28
|
-
if (e.target instanceof Element) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
session.setFocusedViewId(visibleWidgetId);
|
|
34
|
-
}
|
|
29
|
+
if (e.target instanceof Element && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
const visibleWidgetId = (_c = (_b = session.visibleWidget) === null || _b === void 0 ? void 0 : _b.view) === null || _c === void 0 ? void 0 : _c.id;
|
|
32
|
+
if (visibleWidgetId) {
|
|
33
|
+
session.setFocusedViewId(visibleWidgetId);
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
}
|
|
@@ -26,10 +26,8 @@ const ViewContainer = observer(function ({ view, onClose, onMinimize, children,
|
|
|
26
26
|
useEffect(() => {
|
|
27
27
|
function handleSelectView(e) {
|
|
28
28
|
var _a;
|
|
29
|
-
if (e.target instanceof Element) {
|
|
30
|
-
|
|
31
|
-
session.setFocusedViewId(view.id);
|
|
32
|
-
}
|
|
29
|
+
if (e.target instanceof Element && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
30
|
+
session.setFocusedViewId(view.id);
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
33
|
document.addEventListener('mousedown', handleSelectView);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/app-core",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"description": "JBrowse 2 code shared between the 'full featured' apps e.g. jbrowse-web and jbrowse-desktop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime": "^7.16.3",
|
|
45
|
-
"@jbrowse/product-core": "^2.11.
|
|
45
|
+
"@jbrowse/product-core": "^2.11.2",
|
|
46
46
|
"@mui/icons-material": "^5.0.0",
|
|
47
47
|
"@mui/material": "^5.10.17",
|
|
48
48
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "511048cb6965f0bf624c96de244e7fd47fce17d6"
|
|
64
64
|
}
|