@jbrowse/plugin-wiggle 2.7.1 → 2.7.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/Tooltip.js CHANGED
@@ -58,6 +58,8 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
58
58
  },
59
59
  }));
60
60
  const Tooltip = (0, mobx_react_1.observer)(function Tooltip({ model, height, clientMouseCoord, offsetMouseCoord, clientRect, TooltipContents, useClientY, }) {
61
+ var _a, _b;
62
+ const theme = (0, material_1.useTheme)();
61
63
  const { featureUnderMouse } = model;
62
64
  const [width, setWidth] = (0, react_1.useState)(0);
63
65
  const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
@@ -81,8 +83,9 @@ const Tooltip = (0, mobx_react_1.observer)(function Tooltip({ model, height, cli
81
83
  },
82
84
  }), [clientRect === null || clientRect === void 0 ? void 0 : clientRect.top, clientMouseCoord, width, useClientY]);
83
85
  const { styles, attributes } = (0, react_popper_1.usePopper)(virtElement, anchorEl);
86
+ const popperTheme = (_a = theme === null || theme === void 0 ? void 0 : theme.components) === null || _a === void 0 ? void 0 : _a.MuiPopper;
84
87
  return featureUnderMouse ? (react_1.default.createElement(react_1.default.Fragment, null,
85
- react_1.default.createElement(material_1.Portal, null,
88
+ react_1.default.createElement(material_1.Portal, { container: (_b = popperTheme === null || popperTheme === void 0 ? void 0 : popperTheme.defaultProps) === null || _b === void 0 ? void 0 : _b.container },
86
89
  react_1.default.createElement("div", { ref: setAnchorEl, className: classes.tooltip,
87
90
  // zIndex needed to go over widget drawer
88
91
  style: { ...styles.popper, zIndex: 100000 }, ...attributes.popper },
package/esm/Tooltip.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo, useState } from 'react';
2
2
  import { observer } from 'mobx-react';
3
- import { alpha, Portal } from '@mui/material';
3
+ import { alpha, Portal, useTheme } from '@mui/material';
4
4
  import { makeStyles } from 'tss-react/mui';
5
5
  // locals
6
6
  import { YSCALEBAR_LABEL_OFFSET, round } from './util';
@@ -33,6 +33,8 @@ const useStyles = makeStyles()(theme => ({
33
33
  },
34
34
  }));
35
35
  const Tooltip = observer(function Tooltip({ model, height, clientMouseCoord, offsetMouseCoord, clientRect, TooltipContents, useClientY, }) {
36
+ var _a, _b;
37
+ const theme = useTheme();
36
38
  const { featureUnderMouse } = model;
37
39
  const [width, setWidth] = useState(0);
38
40
  const [anchorEl, setAnchorEl] = useState(null);
@@ -56,8 +58,9 @@ const Tooltip = observer(function Tooltip({ model, height, clientMouseCoord, off
56
58
  },
57
59
  }), [clientRect === null || clientRect === void 0 ? void 0 : clientRect.top, clientMouseCoord, width, useClientY]);
58
60
  const { styles, attributes } = usePopper(virtElement, anchorEl);
61
+ const popperTheme = (_a = theme === null || theme === void 0 ? void 0 : theme.components) === null || _a === void 0 ? void 0 : _a.MuiPopper;
59
62
  return featureUnderMouse ? (React.createElement(React.Fragment, null,
60
- React.createElement(Portal, null,
63
+ React.createElement(Portal, { container: (_b = popperTheme === null || popperTheme === void 0 ? void 0 : popperTheme.defaultProps) === null || _b === void 0 ? void 0 : _b.container },
61
64
  React.createElement("div", { ref: setAnchorEl, className: classes.tooltip,
62
65
  // zIndex needed to go over widget drawer
63
66
  style: { ...styles.popper, zIndex: 100000 }, ...attributes.popper },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-wiggle",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "JBrowse 2 wiggle adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -67,5 +67,5 @@
67
67
  "distModule": "esm/index.js",
68
68
  "srcModule": "src/index.ts",
69
69
  "module": "esm/index.js",
70
- "gitHead": "2cda1611eebd12517f2a3cfc1b612face27005d4"
70
+ "gitHead": "9052b295f2d322e729254457ed9fe2231fb22cce"
71
71
  }