@jbrowse/plugin-linear-genome-view 1.6.6 → 1.6.7
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/LinearGenomeView/components/TrackContainer.d.ts +1 -2
- package/dist/plugin-linear-genome-view.cjs.development.js +33 -23
- 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 +33 -23
- package/dist/plugin-linear-genome-view.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/LinearGenomeView/components/TrackContainer.tsx +38 -26
- package/src/LinearGenomeView/components/TracksContainer.tsx +0 -1
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +195 -201
|
@@ -50,13 +50,13 @@ import ArrowBackIcon from '@material-ui/icons/ArrowBack';
|
|
|
50
50
|
import IconButton$1 from '@material-ui/core/IconButton';
|
|
51
51
|
import Slider from '@material-ui/core/Slider';
|
|
52
52
|
import ZoomOut from '@material-ui/icons/ZoomOut';
|
|
53
|
+
import Paper$1 from '@material-ui/core/Paper';
|
|
53
54
|
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
|
54
55
|
import DragIcon from '@material-ui/icons/DragIndicator';
|
|
55
56
|
import normalizeWheel from 'normalize-wheel';
|
|
56
57
|
import { alpha as alpha$1 } from '@material-ui/core/styles/colorManipulator';
|
|
57
58
|
import Popover$1 from '@material-ui/core/Popover';
|
|
58
59
|
import Tooltip$2 from '@material-ui/core/Tooltip';
|
|
59
|
-
import Paper$1 from '@material-ui/core/Paper';
|
|
60
60
|
import ErrorMessage from '@jbrowse/core/ui/ErrorMessage';
|
|
61
61
|
import AssemblySelector from '@jbrowse/core/ui/AssemblySelector';
|
|
62
62
|
import ArrowDown from '@material-ui/icons/KeyboardArrowDown';
|
|
@@ -4660,11 +4660,15 @@ var TrackLabel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4660
4660
|
});
|
|
4661
4661
|
var TrackLabel$1 = /*#__PURE__*/observer(TrackLabel);
|
|
4662
4662
|
|
|
4663
|
-
var useStyles$c = /*#__PURE__*/makeStyles
|
|
4663
|
+
var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
|
|
4664
4664
|
return {
|
|
4665
|
-
root: {
|
|
4665
|
+
root: {
|
|
4666
|
+
margin: 2
|
|
4667
|
+
},
|
|
4666
4668
|
resizeHandle: {
|
|
4667
4669
|
height: RESIZE_HANDLE_HEIGHT,
|
|
4670
|
+
boxSizing: 'border-box',
|
|
4671
|
+
position: 'relative',
|
|
4668
4672
|
zIndex: 2
|
|
4669
4673
|
},
|
|
4670
4674
|
overlay: {
|
|
@@ -4677,8 +4681,7 @@ var useStyles$c = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
4677
4681
|
borderRadius: theme.shape.borderRadius
|
|
4678
4682
|
},
|
|
4679
4683
|
trackLabel: {
|
|
4680
|
-
zIndex: 3
|
|
4681
|
-
margin: theme.spacing(1)
|
|
4684
|
+
zIndex: 3
|
|
4682
4685
|
},
|
|
4683
4686
|
trackLabelInline: {
|
|
4684
4687
|
position: 'relative',
|
|
@@ -4693,19 +4696,29 @@ var useStyles$c = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
4693
4696
|
whiteSpace: 'nowrap',
|
|
4694
4697
|
position: 'relative',
|
|
4695
4698
|
background: 'none',
|
|
4696
|
-
zIndex: 2
|
|
4699
|
+
zIndex: 2,
|
|
4700
|
+
boxSizing: 'content-box'
|
|
4697
4701
|
}
|
|
4698
4702
|
};
|
|
4699
4703
|
});
|
|
4700
4704
|
|
|
4701
|
-
function
|
|
4705
|
+
function TrackContainerLabel(_ref) {
|
|
4702
4706
|
var model = _ref.model,
|
|
4703
|
-
|
|
4707
|
+
view = _ref.view;
|
|
4708
|
+
var classes = useStyles$c();
|
|
4709
|
+
var labelStyle = view.trackLabels === 'overlapping' ? classes.trackLabelOverlap : classes.trackLabelInline;
|
|
4710
|
+
return view.trackLabels !== 'hidden' ? /*#__PURE__*/React.createElement(TrackLabel$1, {
|
|
4711
|
+
track: model,
|
|
4712
|
+
className: clsx(classes.trackLabel, labelStyle)
|
|
4713
|
+
}) : null;
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4716
|
+
function TrackContainer(_ref2) {
|
|
4717
|
+
var model = _ref2.model,
|
|
4718
|
+
track = _ref2.track;
|
|
4704
4719
|
var classes = useStyles$c();
|
|
4705
4720
|
var display = track.displays[0];
|
|
4706
|
-
var
|
|
4707
|
-
trackLabels = model.trackLabels,
|
|
4708
|
-
horizontalScroll = model.horizontalScroll,
|
|
4721
|
+
var horizontalScroll = model.horizontalScroll,
|
|
4709
4722
|
draggingTrackId = model.draggingTrackId,
|
|
4710
4723
|
moveTrack = model.moveTrack;
|
|
4711
4724
|
var height = display.height;
|
|
@@ -4731,10 +4744,13 @@ function TrackContainer(_ref) {
|
|
|
4731
4744
|
var RenderingComponent = display.RenderingComponent,
|
|
4732
4745
|
DisplayBlurb = display.DisplayBlurb;
|
|
4733
4746
|
var dimmed = draggingTrackId !== undefined && draggingTrackId !== display.id;
|
|
4734
|
-
return /*#__PURE__*/React.createElement(
|
|
4735
|
-
className: classes.root
|
|
4736
|
-
|
|
4737
|
-
|
|
4747
|
+
return /*#__PURE__*/React.createElement(Paper$1, {
|
|
4748
|
+
className: classes.root,
|
|
4749
|
+
variant: "outlined"
|
|
4750
|
+
}, /*#__PURE__*/React.createElement(TrackContainerLabel, {
|
|
4751
|
+
model: track,
|
|
4752
|
+
view: model
|
|
4753
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
4738
4754
|
className: classes.trackRenderingContainer,
|
|
4739
4755
|
style: {
|
|
4740
4756
|
height: height
|
|
@@ -4744,19 +4760,15 @@ function TrackContainer(_ref) {
|
|
|
4744
4760
|
display.setScrollTop(target.scrollTop);
|
|
4745
4761
|
},
|
|
4746
4762
|
onDragEnter: debouncedOnDragEnter,
|
|
4747
|
-
"data-testid": "trackRenderingContainer-".concat(id, "-").concat(trackId),
|
|
4763
|
+
"data-testid": "trackRenderingContainer-".concat(model.id, "-").concat(trackId),
|
|
4748
4764
|
role: "presentation"
|
|
4749
|
-
},
|
|
4750
|
-
track: track,
|
|
4751
|
-
className: clsx(classes.trackLabel, trackLabels === 'overlapping' ? classes.trackLabelOverlap : classes.trackLabelInline)
|
|
4752
|
-
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
4765
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
4753
4766
|
ref: ref,
|
|
4754
4767
|
style: {
|
|
4755
4768
|
transform: "scaleX(".concat(model.scaleFactor, ")")
|
|
4756
4769
|
}
|
|
4757
4770
|
}, /*#__PURE__*/React.createElement(RenderingComponent, {
|
|
4758
4771
|
model: display,
|
|
4759
|
-
blockState: {},
|
|
4760
4772
|
onHorizontalScroll: horizontalScroll
|
|
4761
4773
|
})), DisplayBlurb ? /*#__PURE__*/React.createElement("div", {
|
|
4762
4774
|
style: {
|
|
@@ -5535,8 +5547,6 @@ function TracksContainer(_ref) {
|
|
|
5535
5547
|
boxSizing: 'border-box'
|
|
5536
5548
|
}
|
|
5537
5549
|
})
|
|
5538
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
5539
|
-
className: classes.spacer
|
|
5540
5550
|
}), children);
|
|
5541
5551
|
}
|
|
5542
5552
|
|