@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.
@@ -22,11 +22,10 @@ import { ObservableCreate } from '@jbrowse/core/util/rxjs';
22
22
  import { TabixIndexedFile } from '@gmod/tabix';
23
23
  import IntervalTree from '@flatten-js/interval-tree';
24
24
  import { unzip } from '@gmod/bgzf-filehandle';
25
- import { Dialog, DialogTitle, IconButton, Divider, DialogContent, FormControlLabel, Checkbox, DialogActions, Button, Paper, Typography, TextField, Link } from '@material-ui/core';
25
+ import { Dialog, DialogTitle, IconButton, Divider, DialogContent, FormControlLabel, Checkbox, DialogActions, Button, makeStyles, Paper, Typography, TextField, Link } from '@material-ui/core';
26
26
  import SimpleFeature from '@jbrowse/core/util/simpleFeature';
27
27
  import { DataGrid } from '@mui/x-data-grid';
28
28
  import { FeatureDetails, BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
29
- import { makeStyles } from '@material-ui/core/styles';
30
29
  import CloseIcon from '@material-ui/icons/Close';
31
30
 
32
31
  function ownKeys(object, enumerableOnly) {
@@ -2619,7 +2618,7 @@ function BreakendOptionDialog(_ref) {
2619
2618
  }, /*#__PURE__*/React.createElement(DialogTitle, null, "Breakpoint split view options", handleClose ? /*#__PURE__*/React.createElement(IconButton, {
2620
2619
  className: classes.closeButton,
2621
2620
  onClick: function onClick() {
2622
- handleClose();
2621
+ return handleClose();
2623
2622
  }
2624
2623
  }, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement(FormControlLabel, {
2625
2624
  className: classes.block,
@@ -2647,14 +2646,21 @@ function BreakendOptionDialog(_ref) {
2647
2646
  onClick: function onClick() {
2648
2647
  var view = model.view;
2649
2648
  var session = getSession(model);
2650
- var viewSnapshot = viewType.snapshotFromBreakendFeature(feature, view);
2651
- viewSnapshot.views[0].offsetPx -= view.width / 2 + 100;
2652
- viewSnapshot.views[1].offsetPx -= view.width / 2 + 100;
2653
- viewSnapshot.featureData = feature;
2654
- var viewTracks = getSnapshot(view.tracks);
2655
- viewSnapshot.views[0].tracks = viewTracks;
2656
- viewSnapshot.views[1].tracks = mirrorTracks ? viewTracks.slice().reverse() : viewTracks;
2657
- session.addView('BreakpointSplitView', viewSnapshot);
2649
+
2650
+ try {
2651
+ var viewSnapshot = viewType.snapshotFromBreakendFeature(feature, view);
2652
+ viewSnapshot.views[0].offsetPx -= view.width / 2 + 100;
2653
+ viewSnapshot.views[1].offsetPx -= view.width / 2 + 100;
2654
+ viewSnapshot.featureData = feature;
2655
+ var viewTracks = getSnapshot(view.tracks);
2656
+ viewSnapshot.views[0].tracks = viewTracks;
2657
+ viewSnapshot.views[1].tracks = mirrorTracks ? viewTracks.slice().reverse() : viewTracks;
2658
+ session.addView('BreakpointSplitView', viewSnapshot);
2659
+ } catch (e) {
2660
+ console.error(e);
2661
+ session.notify("".concat(e));
2662
+ }
2663
+
2658
2664
  handleClose();
2659
2665
  },
2660
2666
  variant: "contained",
@@ -2662,11 +2668,10 @@ function BreakendOptionDialog(_ref) {
2662
2668
  autoFocus: true
2663
2669
  }, "OK"), /*#__PURE__*/React.createElement(Button, {
2664
2670
  onClick: function onClick() {
2665
- handleClose();
2671
+ return handleClose();
2666
2672
  },
2667
2673
  color: "secondary",
2668
- variant: "contained",
2669
- autoFocus: true
2674
+ variant: "contained"
2670
2675
  }, "Cancel")));
2671
2676
  }
2672
2677
 
@@ -2799,12 +2804,17 @@ function BreakendPanel(props) {
2799
2804
  event.preventDefault();
2800
2805
  var view = model.view;
2801
2806
 
2802
- if (view) {
2803
- var _view$navToLocString;
2807
+ try {
2808
+ if (view) {
2809
+ var _view$navToLocString;
2804
2810
 
2805
- (_view$navToLocString = view.navToLocString) === null || _view$navToLocString === void 0 ? void 0 : _view$navToLocString.call(view, locString);
2806
- } else {
2807
- session.notify('No view associated with this feature detail panel anymore', 'warning');
2811
+ (_view$navToLocString = view.navToLocString) === null || _view$navToLocString === void 0 ? void 0 : _view$navToLocString.call(view, locString);
2812
+ } else {
2813
+ throw new Error('No view associated with this feature detail panel anymore');
2814
+ }
2815
+ } catch (e) {
2816
+ console.error(e);
2817
+ session.notify("".concat(e));
2808
2818
  }
2809
2819
  }
2810
2820
  }, "LGV - ".concat(locString)));