@jbrowse/plugin-linear-genome-view 1.6.7 → 1.6.8
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/LinearBareDisplay/model.d.ts +7 -7
- package/dist/LinearBasicDisplay/model.d.ts +7 -7
- package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +6 -6
- package/dist/index.d.ts +21 -21
- package/dist/plugin-linear-genome-view.cjs.development.js +37 -22
- package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
- package/dist/plugin-linear-genome-view.esm.js +37 -22
- package/dist/plugin-linear-genome-view.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +9 -12
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +21 -12
- package/src/LinearGenomeView/components/TrackContainer.tsx +31 -24
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +27 -47
|
@@ -14,8 +14,8 @@ import { isFeature } from '@jbrowse/core/util/simpleFeature';
|
|
|
14
14
|
import { getParentRenderProps, getTrackAssemblyNames, getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
15
15
|
import { getParent, types, cast, isAlive, addDisposer, getEnv, resolveIdentifier, getRoot, getSnapshot } from 'mobx-state-tree';
|
|
16
16
|
import MenuOpenIcon from '@material-ui/icons/MenuOpen';
|
|
17
|
-
import { Menu, ResizeHandle, ReturnToImportFormDialog } from '@jbrowse/core/ui';
|
|
18
17
|
import { observer, PropTypes } from 'mobx-react';
|
|
18
|
+
import { Menu, ResizeHandle, ReturnToImportFormDialog } from '@jbrowse/core/ui';
|
|
19
19
|
import { usePopper } from 'react-popper';
|
|
20
20
|
import { makeStyles } from '@material-ui/core/styles';
|
|
21
21
|
import { ContentBlock as ContentBlock$1, ElidedBlock as ElidedBlock$1, InterRegionPaddingBlock as InterRegionPaddingBlock$1 } from '@jbrowse/core/util/blockTypes';
|
|
@@ -1459,14 +1459,17 @@ var BaseLinearDisplay = /*#__PURE__*/observer(function (props) {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
},
|
|
1461
1461
|
onMouseMove: function onMouseMove(event) {
|
|
1462
|
-
if (ref.current) {
|
|
1463
|
-
|
|
1464
|
-
setOffsetMouseCoord([event.clientX - rect.left, event.clientY - rect.top]);
|
|
1465
|
-
setClientMouseCoord([event.clientX, event.clientY]);
|
|
1466
|
-
setClientRect(rect);
|
|
1462
|
+
if (!ref.current) {
|
|
1463
|
+
return;
|
|
1467
1464
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1465
|
+
|
|
1466
|
+
var rect = ref.current.getBoundingClientRect();
|
|
1467
|
+
var left = rect.left,
|
|
1468
|
+
top = rect.top;
|
|
1469
|
+
setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
|
|
1470
|
+
setClientMouseCoord([event.clientX, event.clientY]);
|
|
1471
|
+
setClientRect(rect);
|
|
1472
|
+
}
|
|
1470
1473
|
}, DisplayMessageComponent ? /*#__PURE__*/React.createElement(DisplayMessageComponent, {
|
|
1471
1474
|
model: model
|
|
1472
1475
|
}) : /*#__PURE__*/React.createElement(LinearBlocks$1, Object.assign({}, props)), children, /*#__PURE__*/React.createElement(TooltipComponent, {
|
|
@@ -4663,7 +4666,7 @@ var TrackLabel$1 = /*#__PURE__*/observer(TrackLabel);
|
|
|
4663
4666
|
var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
|
|
4664
4667
|
return {
|
|
4665
4668
|
root: {
|
|
4666
|
-
|
|
4669
|
+
marginTop: 2
|
|
4667
4670
|
},
|
|
4668
4671
|
resizeHandle: {
|
|
4669
4672
|
height: RESIZE_HANDLE_HEIGHT,
|
|
@@ -4683,6 +4686,15 @@ var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4683
4686
|
trackLabel: {
|
|
4684
4687
|
zIndex: 3
|
|
4685
4688
|
},
|
|
4689
|
+
// aligns with block bounderies. check for example the breakpoint split view
|
|
4690
|
+
// demo to see if features align if wanting to change things
|
|
4691
|
+
renderingComponentContainer: {
|
|
4692
|
+
position: 'absolute',
|
|
4693
|
+
// -1 offset because of the 1px border of the Paper
|
|
4694
|
+
left: -1,
|
|
4695
|
+
height: '100%',
|
|
4696
|
+
width: '100%'
|
|
4697
|
+
},
|
|
4686
4698
|
trackLabelInline: {
|
|
4687
4699
|
position: 'relative',
|
|
4688
4700
|
display: 'inline-block'
|
|
@@ -4696,13 +4708,11 @@ var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4696
4708
|
whiteSpace: 'nowrap',
|
|
4697
4709
|
position: 'relative',
|
|
4698
4710
|
background: 'none',
|
|
4699
|
-
zIndex: 2
|
|
4700
|
-
boxSizing: 'content-box'
|
|
4711
|
+
zIndex: 2
|
|
4701
4712
|
}
|
|
4702
4713
|
};
|
|
4703
4714
|
});
|
|
4704
|
-
|
|
4705
|
-
function TrackContainerLabel(_ref) {
|
|
4715
|
+
var TrackContainerLabel = /*#__PURE__*/observer(function (_ref) {
|
|
4706
4716
|
var model = _ref.model,
|
|
4707
4717
|
view = _ref.view;
|
|
4708
4718
|
var classes = useStyles$c();
|
|
@@ -4711,7 +4721,7 @@ function TrackContainerLabel(_ref) {
|
|
|
4711
4721
|
track: model,
|
|
4712
4722
|
className: clsx(classes.trackLabel, labelStyle)
|
|
4713
4723
|
}) : null;
|
|
4714
|
-
}
|
|
4724
|
+
});
|
|
4715
4725
|
|
|
4716
4726
|
function TrackContainer(_ref2) {
|
|
4717
4727
|
var model = _ref2.model,
|
|
@@ -4764,6 +4774,7 @@ function TrackContainer(_ref2) {
|
|
|
4764
4774
|
role: "presentation"
|
|
4765
4775
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4766
4776
|
ref: ref,
|
|
4777
|
+
className: classes.renderingComponentContainer,
|
|
4767
4778
|
style: {
|
|
4768
4779
|
transform: "scaleX(".concat(model.scaleFactor, ")")
|
|
4769
4780
|
}
|
|
@@ -8056,26 +8067,30 @@ function SetMaxHeightDlg$1(props) {
|
|
|
8056
8067
|
"aria-label": "close",
|
|
8057
8068
|
className: classes.closeButton,
|
|
8058
8069
|
onClick: handleClose
|
|
8059
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(DialogContent,
|
|
8070
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(DialogContent, {
|
|
8060
8071
|
className: classes.root
|
|
8061
|
-
}, /*#__PURE__*/React.createElement(Typography$1, null, "Set max height for the track"), /*#__PURE__*/React.createElement(TextField, {
|
|
8072
|
+
}, /*#__PURE__*/React.createElement(Typography$1, null, "Set max height for the track. For example, you can increase this if the layout says \"Max height reached\""), /*#__PURE__*/React.createElement(TextField, {
|
|
8062
8073
|
value: max,
|
|
8063
8074
|
onChange: function onChange(event) {
|
|
8064
|
-
setMax(event.target.value);
|
|
8075
|
+
return setMax(event.target.value);
|
|
8065
8076
|
},
|
|
8066
8077
|
placeholder: "Enter max score"
|
|
8067
|
-
}), /*#__PURE__*/React.createElement(Button$1, {
|
|
8078
|
+
}), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
8068
8079
|
variant: "contained",
|
|
8069
8080
|
color: "primary",
|
|
8070
8081
|
type: "submit",
|
|
8071
|
-
|
|
8072
|
-
marginLeft: 20
|
|
8073
|
-
},
|
|
8082
|
+
autoFocus: true,
|
|
8074
8083
|
onClick: function onClick() {
|
|
8075
8084
|
model.setMaxHeight(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
8076
8085
|
handleClose();
|
|
8077
8086
|
}
|
|
8078
|
-
}, "Submit")
|
|
8087
|
+
}, "Submit"), /*#__PURE__*/React.createElement(Button$1, {
|
|
8088
|
+
variant: "contained",
|
|
8089
|
+
color: "secondary",
|
|
8090
|
+
onClick: function onClick() {
|
|
8091
|
+
return handleClose();
|
|
8092
|
+
}
|
|
8093
|
+
}, "Cancel"))));
|
|
8079
8094
|
}
|
|
8080
8095
|
|
|
8081
8096
|
var SetMaxHeight = /*#__PURE__*/observer(SetMaxHeightDlg$1);
|