higlass 1.13.5 → 1.13.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.
Files changed (131) hide show
  1. package/README.md +48 -54
  2. package/app/globals.d.ts +1 -1
  3. package/app/missing-types.d.ts +4 -1
  4. package/app/scripts/AddTrackDialog.jsx +3 -3
  5. package/app/scripts/AddTrackPositionMenu.jsx +2 -2
  6. package/app/scripts/Annotations1dTrack.js +1 -1
  7. package/app/scripts/Annotations2dTrack.js +3 -5
  8. package/app/scripts/Autocomplete.jsx +14 -21
  9. package/app/scripts/AxisPixi.js +6 -10
  10. package/app/scripts/BarTrack.js +3 -3
  11. package/app/scripts/BedLikeTrack.js +12 -13
  12. package/app/scripts/Button.jsx +1 -1
  13. package/app/scripts/CNVIntervalTrack.js +1 -1
  14. package/app/scripts/CenterTrack.jsx +8 -7
  15. package/app/scripts/Chromosome2DAnnotations.js +1 -1
  16. package/app/scripts/Chromosome2DLabels.js +1 -1
  17. package/app/scripts/ChromosomeGrid.js +49 -38
  18. package/app/scripts/ChromosomeInfo.js +1 -1
  19. package/app/scripts/CombinedTrack.js +3 -1
  20. package/app/scripts/ConfigTrackMenu.jsx +1 -1
  21. package/app/scripts/ConfigViewMenu.jsx +2 -2
  22. package/app/scripts/ContextMenuContainer.jsx +1 -2
  23. package/app/scripts/ContextMenuItem.jsx +1 -0
  24. package/app/scripts/CrossRule.js +1 -1
  25. package/app/scripts/CustomTrackDialog.jsx +2 -2
  26. package/app/scripts/Dialog.jsx +2 -2
  27. package/app/scripts/DragListeningDiv.jsx +1 -1
  28. package/app/scripts/DraggableDiv.jsx +2 -3
  29. package/app/scripts/ExportLinkDialog.jsx +1 -1
  30. package/app/scripts/GalleryTracks.jsx +77 -78
  31. package/app/scripts/GenomePositionSearchBox.jsx +10 -9
  32. package/app/scripts/HeatmapOptions.jsx +4 -2
  33. package/app/scripts/HeatmapTiledPixiTrack.js +23 -32
  34. package/app/scripts/HiGlassComponent.jsx +75 -98
  35. package/app/scripts/Horizontal1dHeatmapTrack.js +1 -1
  36. package/app/scripts/Horizontal2DDomainsTrack.js +1 -1
  37. package/app/scripts/HorizontalChromosomeLabels.js +28 -22
  38. package/app/scripts/HorizontalGeneAnnotationsTrack.js +1 -1
  39. package/app/scripts/HorizontalHeatmapTrack.js +2 -2
  40. package/app/scripts/HorizontalMultivecTrack.js +6 -7
  41. package/app/scripts/HorizontalRule.js +1 -2
  42. package/app/scripts/HorizontalTiled1DPixiTrack.js +4 -4
  43. package/app/scripts/HorizontalTiledPlot.jsx +9 -9
  44. package/app/scripts/LeftTrackModifier.js +4 -0
  45. package/app/scripts/ListWrapper.jsx +1 -2
  46. package/app/scripts/MapboxTilesTrack.js +1 -2
  47. package/app/scripts/Modal.jsx +2 -2
  48. package/app/scripts/MoveableTrack.jsx +10 -12
  49. package/app/scripts/NestedContextMenu.jsx +2 -1
  50. package/app/scripts/OSMTileIdsTrack.js +1 -1
  51. package/app/scripts/OverlayTrack.js +4 -4
  52. package/app/scripts/PixiTrack.js +27 -13
  53. package/app/scripts/PlotTypeChooser.jsx +3 -4
  54. package/app/scripts/SearchField.js +5 -5
  55. package/app/scripts/SeriesListItems.jsx +3 -4
  56. package/app/scripts/SeriesListMenu.jsx +6 -11
  57. package/app/scripts/SeriesListSubmenuMixin.jsx +1 -1
  58. package/app/scripts/SketchInlinePicker.jsx +2 -2
  59. package/app/scripts/SortableList.jsx +1 -1
  60. package/app/scripts/Tiled1DPixiTrack.js +5 -1
  61. package/app/scripts/TiledPixiTrack.js +232 -99
  62. package/app/scripts/TiledPlot.jsx +33 -43
  63. package/app/scripts/TilesetFinder.jsx +12 -4
  64. package/app/scripts/Track.js +1 -1
  65. package/app/scripts/TrackArea.jsx +4 -0
  66. package/app/scripts/TrackControl.jsx +2 -2
  67. package/app/scripts/TrackRenderer.jsx +30 -31
  68. package/app/scripts/ValueIntervalTrack.js +1 -1
  69. package/app/scripts/VerticalRule.js +2 -2
  70. package/app/scripts/VerticalTiledPlot.jsx +7 -7
  71. package/app/scripts/ViewConfigEditor.jsx +1 -1
  72. package/app/scripts/ViewContextMenu.jsx +4 -4
  73. package/app/scripts/ViewHeader.jsx +6 -7
  74. package/app/scripts/ViewportTracker2D.js +1 -1
  75. package/app/scripts/api.js +5 -6
  76. package/app/scripts/configs/available-track-types.js +1 -1
  77. package/app/scripts/configs/positions-by-datatype.js +2 -2
  78. package/app/scripts/configs/themes.js +0 -1
  79. package/app/scripts/configs/tracks-info-by-type.js +11 -8
  80. package/app/scripts/configs/tracks-info.js +2 -2
  81. package/app/scripts/d3-context-menu.js +3 -4
  82. package/app/scripts/data-fetchers/DataFetcher.js +35 -36
  83. package/app/scripts/data-fetchers/genbank-fetcher.js +6 -10
  84. package/app/scripts/data-fetchers/local-tile-fetcher.js +2 -6
  85. package/app/scripts/hglib.jsx +1 -1
  86. package/app/scripts/hocs/with-modal.jsx +32 -10
  87. package/app/scripts/hocs/with-pub-sub.js +12 -3
  88. package/app/scripts/hocs/with-theme.jsx +21 -14
  89. package/app/scripts/icons.jsx +3 -2
  90. package/app/scripts/mixwith.js +2 -2
  91. package/app/scripts/plugins/get-data-fetcher.js +2 -3
  92. package/app/scripts/services/chrom-info.js +32 -4
  93. package/app/scripts/services/element-resize-listener.js +2 -2
  94. package/app/scripts/services/index.js +0 -1
  95. package/app/scripts/services/tile-proxy.js +368 -281
  96. package/app/scripts/services/worker.js +30 -28
  97. package/app/scripts/test-helpers/test-helpers.jsx +3 -3
  98. package/app/scripts/types.ts +50 -44
  99. package/app/scripts/utils/LruCache.js +3 -2
  100. package/app/scripts/utils/assert.js +19 -0
  101. package/app/scripts/utils/background-task-scheduler.js +2 -0
  102. package/app/scripts/utils/color-domain-to-rgba-array.js +13 -3
  103. package/app/scripts/utils/dict-items.js +1 -0
  104. package/app/scripts/utils/dict-keys.js +1 -0
  105. package/app/scripts/utils/dict-values.js +1 -0
  106. package/app/scripts/utils/expand-combined-tracks.js +11 -7
  107. package/app/scripts/utils/fill-in-min-widths.js +47 -21
  108. package/app/scripts/utils/flatten.js +0 -1
  109. package/app/scripts/utils/get-aggregation-function.js +1 -1
  110. package/app/scripts/utils/get-default-track-for-datatype.js +36 -10
  111. package/app/scripts/utils/get-higlass-components.js +27 -3
  112. package/app/scripts/utils/get-track-position-by-uid.js +8 -1
  113. package/app/scripts/utils/get-xylofon.js +12 -9
  114. package/app/scripts/utils/has-parent.js +5 -5
  115. package/app/scripts/utils/hex-string-to-int.js +1 -1
  116. package/app/scripts/utils/interval-tree.js +222 -177
  117. package/app/scripts/utils/load-chrom-infos.js +4 -1
  118. package/app/scripts/utils/pixi-text-to-svg.js +5 -9
  119. package/app/scripts/utils/range-query-2d.js +3 -3
  120. package/app/scripts/utils/reduce.js +12 -5
  121. package/app/scripts/utils/segments-to-rows.js +14 -11
  122. package/app/scripts/utils/show-mouse-position.js +16 -0
  123. package/app/scripts/utils/svg-line.js +7 -8
  124. package/app/scripts/utils/type-guards.js +16 -7
  125. package/app/scripts/utils/visit-positioned-tracks.js +7 -5
  126. package/app/styles/d3-context-menu.css +0 -1
  127. package/app/styles/prism.css +1 -0
  128. package/dist/hglib.js +78064 -77770
  129. package/dist/hglib.min.js +109 -109
  130. package/dist/higlass.mjs +82736 -82442
  131. package/package.json +13 -18
@@ -1,14 +1,13 @@
1
1
  // @ts-nocheck
2
- import PixiTrack from './PixiTrack';
3
2
  import ChromosomeInfo from './ChromosomeInfo';
4
- import SearchField from './SearchField';
3
+ import TiledPixiTrack from './TiledPixiTrack';
5
4
 
6
5
  import { colorToHex } from './utils';
7
6
 
8
7
  // Configs
9
8
  import { GLOBALS } from './configs';
10
9
 
11
- class ChromosomeGrid extends PixiTrack {
10
+ class ChromosomeGrid extends TiledPixiTrack {
12
11
  constructor(context, options) {
13
12
  super(context, options);
14
13
  const {
@@ -20,47 +19,59 @@ class ChromosomeGrid extends PixiTrack {
20
19
  isOverlay = false,
21
20
  } = context;
22
21
 
23
- this.searchField = null;
24
22
  this.chromInfo = null;
25
23
  this.animate = animate;
26
24
  this.orientation = orientation;
27
25
  this.isOverlay = isOverlay;
28
26
 
29
- let chromSizesPath = chromInfoPath;
30
-
31
- if (!chromSizesPath) {
32
- chromSizesPath = `${dataConfig.server}/chrom-sizes/?id=${dataConfig.tilesetUid}`;
27
+ /** The previous chromInfoPath approach to loading chromosome size.
28
+ *
29
+ * This is superseded by loading chromosome sizes directly from the
30
+ * tileset info object
31
+ */
32
+ if (chromInfoPath) {
33
+ ChromosomeInfo(
34
+ chromInfoPath,
35
+ (newChromInfo) => {
36
+ this.chromInfo = newChromInfo;
37
+
38
+ this.tilesetInfoReceived();
39
+ },
40
+ this.pubSub,
41
+ );
33
42
  }
43
+ }
34
44
 
35
- ChromosomeInfo(
36
- chromSizesPath,
37
- (newChromInfo) => {
38
- this.chromInfo = newChromInfo;
39
-
40
- this.searchField = new SearchField(this.chromInfo);
41
-
42
- this.texts = [];
43
- this.lineGraphics = new GLOBALS.PIXI.Graphics();
44
- this.lineGraphics1dH = new GLOBALS.PIXI.Graphics();
45
- this.lineGraphics1dV = new GLOBALS.PIXI.Graphics();
46
- this.lineGraphics2d = new GLOBALS.PIXI.Graphics();
47
- this.mask1dH = new GLOBALS.PIXI.Graphics();
48
- this.mask1dV = new GLOBALS.PIXI.Graphics();
49
- this.mask2d = new GLOBALS.PIXI.Graphics();
50
-
51
- this.lineGraphics.addChild(this.lineGraphics1dH);
52
- this.lineGraphics1dH.addChild(this.mask1dH);
53
- this.lineGraphics.addChild(this.lineGraphics1dV);
54
- this.lineGraphics1dV.addChild(this.mask1dV);
55
- this.lineGraphics.addChild(this.lineGraphics2d);
56
- this.lineGraphics2d.addChild(this.mask2d);
57
- this.pMain.addChild(this.lineGraphics);
58
-
59
- this.draw();
60
- this.animate();
61
- },
62
- pubSub,
63
- );
45
+ /** We got tileset info which (presumably) has chromsizes.
46
+ *
47
+ * Set up all the graphics objects necessary for rendering
48
+ * the chromosome grid.
49
+ */
50
+ tilesetInfoReceived() {
51
+ this.texts = [];
52
+ this.lineGraphics = new GLOBALS.PIXI.Graphics();
53
+ this.lineGraphics1dH = new GLOBALS.PIXI.Graphics();
54
+ this.lineGraphics1dV = new GLOBALS.PIXI.Graphics();
55
+ this.lineGraphics2d = new GLOBALS.PIXI.Graphics();
56
+ this.mask1dH = new GLOBALS.PIXI.Graphics();
57
+ this.mask1dV = new GLOBALS.PIXI.Graphics();
58
+ this.mask2d = new GLOBALS.PIXI.Graphics();
59
+
60
+ this.lineGraphics.addChild(this.lineGraphics1dH);
61
+ this.lineGraphics1dH.addChild(this.mask1dH);
62
+ this.lineGraphics.addChild(this.lineGraphics1dV);
63
+ this.lineGraphics1dV.addChild(this.mask1dV);
64
+ this.lineGraphics.addChild(this.lineGraphics2d);
65
+ this.lineGraphics2d.addChild(this.mask2d);
66
+ this.pMain.addChild(this.lineGraphics);
67
+
68
+ this.draw();
69
+ this.animate();
70
+ }
71
+
72
+ calculateVisibleTiles() {
73
+ /** This track does not use tiles so return an empty set */
74
+ return [];
64
75
  }
65
76
 
66
77
  drawLines(orientation = this.orientation, left = 0, top = 0) {
@@ -123,7 +134,7 @@ class ChromosomeGrid extends PixiTrack {
123
134
  return;
124
135
  }
125
136
 
126
- if (!this.searchField) {
137
+ if (!this.tilesetInfo) {
127
138
  return;
128
139
  }
129
140
 
@@ -4,8 +4,8 @@ import { tileProxy } from './services';
4
4
 
5
5
  import absToChr from './utils/abs-to-chr';
6
6
  import chrToAbs from './utils/chr-to-abs';
7
- import parseChromsizesRows from './utils/parse-chromsizes-rows';
8
7
  import fakePubSub from './utils/fake-pub-sub';
8
+ import parseChromsizesRows from './utils/parse-chromsizes-rows';
9
9
 
10
10
  function ChromosomeInfo(filepath, success, pubSub = fakePubSub) {
11
11
  const ret = {};
@@ -175,6 +175,7 @@ class CombinedTrack {
175
175
  }
176
176
 
177
177
  minValue(_) {
178
+ // biome-ignore lint/style/noArguments: Getter/Setter
178
179
  if (arguments.length === 0) {
179
180
  const minValues = this.childTracks
180
181
  .filter((x) => x.minValue) // filter for tracks which have the minValue function
@@ -192,6 +193,7 @@ class CombinedTrack {
192
193
  }
193
194
 
194
195
  maxValue(_) {
196
+ // biome-ignore lint/style/noArguments: Getter/Setter
195
197
  if (arguments.length === 0) {
196
198
  const maxValues = this.childTracks
197
199
  .filter((x) => x.maxValue) // filter for tracks which have the minValue function
@@ -230,7 +232,7 @@ class CombinedTrack {
230
232
  if (childTrack.getMouseOverHtml) {
231
233
  const trackHtml = childTrack.getMouseOverHtml(trackX, trackY);
232
234
 
233
- if (trackHtml && trackHtml.length) {
235
+ if (trackHtml?.length) {
234
236
  mouseOverHtml += trackHtml;
235
237
  mouseOverHtml += '<br/>';
236
238
  }
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
- import React from 'react';
3
2
  import clsx from 'clsx';
3
+ import React from 'react';
4
4
  import { mix } from './mixwith';
5
5
 
6
6
  import ContextMenuContainer from './ContextMenuContainer';
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
2
  import clsx from 'clsx';
3
+ import PropTypes from 'prop-types';
4
+ import React from 'react';
5
5
 
6
6
  import ContextMenuContainer from './ContextMenuContainer';
7
7
  import ContextMenuItem from './ContextMenuItem';
@@ -1,8 +1,8 @@
1
1
  // @ts-nocheck
2
+ import clsx from 'clsx';
2
3
  import PropTypes from 'prop-types';
3
4
  import React from 'react';
4
5
  import ReactDOM from 'react-dom';
5
- import clsx from 'clsx';
6
6
 
7
7
  import { THEME_DARK } from './configs';
8
8
 
@@ -36,7 +36,6 @@ class ContextMenuContainer extends React.Component {
36
36
  this.updateOrientation();
37
37
  }
38
38
 
39
- // eslint-disable-next-line camelcase
40
39
  UNSAFE_componentWillReceiveProps(newProps) {
41
40
  this.adjusted = false;
42
41
 
@@ -15,6 +15,7 @@ function ContextMenuItem(props) {
15
15
  onClick={(e) => props.onClick(e)}
16
16
  onMouseEnter={(e) => props.onMouseEnter(e)}
17
17
  onMouseLeave={(e) => props.onMouseLeave(e)}
18
+ // biome-ignore lint/a11y/useSemanticElements:
18
19
  role="button"
19
20
  tabIndex={0}
20
21
  >
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
- import { colorToHex } from './utils';
3
2
  import { mix } from './mixwith';
3
+ import { colorToHex } from './utils';
4
4
 
5
5
  import PixiTrack from './PixiTrack';
6
6
  import RuleMixin from './RuleMixin';
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
- import React from 'react';
3
2
  import PropTypes from 'prop-types';
3
+ import React from 'react';
4
4
 
5
5
  import Dialog from './Dialog';
6
6
 
@@ -12,7 +12,7 @@ class CustomTrackDialog extends React.PureComponent {
12
12
  const childrenWithProp = [];
13
13
  this.props.children.forEach((Child, i) => {
14
14
  const key = `customTrackDialog_${i}`;
15
- // eslint-disable-next-line react/jsx-props-no-spreading
15
+
16
16
  childrenWithProp.push(<Child key={key} {...this.props.bodyProps[i]} />);
17
17
  });
18
18
 
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
2
  import clsx from 'clsx';
3
+ import PropTypes from 'prop-types';
4
+ import React from 'react';
5
5
 
6
6
  import Button from './Button';
7
7
  import Cross from './Cross';
@@ -1,8 +1,8 @@
1
1
  // @ts-nocheck
2
+ import clsx from 'clsx';
2
3
  import PropTypes from 'prop-types';
3
4
  import React from 'react';
4
5
  import slugid from 'slugid';
5
- import clsx from 'clsx';
6
6
 
7
7
  import withPubSub from './hocs/with-pub-sub';
8
8
 
@@ -1,12 +1,12 @@
1
1
  // @ts-nocheck
2
+ import clsx from 'clsx';
2
3
  import { drag } from 'd3-drag';
3
4
  import { pointer, select } from 'd3-selection';
4
5
  import PropTypes from 'prop-types';
5
6
  import React from 'react';
6
- import clsx from 'clsx';
7
7
 
8
- import withTheme from './hocs/with-theme';
9
8
  import { THEME_DARK } from './configs';
9
+ import withTheme from './hocs/with-theme';
10
10
 
11
11
  import classes from '../styles/DraggableDiv.module.scss';
12
12
 
@@ -65,7 +65,6 @@ class DraggableDiv extends React.Component {
65
65
  select(this.rightHandle).call(this.dragRight);
66
66
  }
67
67
 
68
- // eslint-disable-next-line camelcase
69
68
  UNSAFE_componentWillReceiveProps(newProps) {
70
69
  if ('width' in newProps) {
71
70
  this.setState({ width: newProps.width });
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
- import React from 'react';
3
2
  import PropTypes from 'prop-types';
3
+ import React from 'react';
4
4
 
5
5
  import Button from './Button';
6
6
  import Dialog from './Dialog';
@@ -1,14 +1,14 @@
1
1
  // @ts-nocheck
2
+ import clsx from 'clsx';
2
3
  import PropTypes from 'prop-types';
3
4
  import React from 'react';
4
- import clsx from 'clsx';
5
5
 
6
6
  import TrackControl from './TrackControl';
7
7
 
8
8
  // Styles
9
- import styles from '../styles/GalleryTracks.module.scss'; // eslint-disable-line no-unused-vars
10
- import stylesPlot from '../styles/TiledPlot.module.scss'; // eslint-disable-line no-unused-vars
11
- import stylesTrack from '../styles/Track.module.scss'; // eslint-disable-line no-unused-vars
9
+ import styles from '../styles/GalleryTracks.module.scss';
10
+ import stylesPlot from '../styles/TiledPlot.module.scss';
11
+ import stylesTrack from '../styles/Track.module.scss';
12
12
 
13
13
  const STYLES = {
14
14
  pointerEvents: 'all',
@@ -32,85 +32,84 @@ class GalleryTracks extends React.Component {
32
32
  render() {
33
33
  return (
34
34
  <div className={clsx('gallery-tracks', styles['gallery-tracks'])}>
35
- {this.props.tracks &&
36
- this.props.tracks.map((track, index) => (
35
+ {this.props.tracks?.map((track, index) => (
36
+ <div
37
+ key={track.uid || index}
38
+ className={styles['gallery-track']}
39
+ onMouseLeave={this.mouseLeaveHandler.bind(this)}
40
+ style={{
41
+ top: track.height * index,
42
+ right: track.height * index,
43
+ bottom: track.height * index,
44
+ left: track.height * index,
45
+ }}
46
+ >
47
+ <div
48
+ className={styles['gallery-sub-track']}
49
+ onMouseEnter={this.mouseEnterHandler.bind(this)}
50
+ style={{
51
+ top: 0,
52
+ right: 0,
53
+ left: 0,
54
+ height: track.height,
55
+ }}
56
+ />
57
+ <div
58
+ className={styles['gallery-sub-track']}
59
+ onMouseEnter={this.mouseEnterHandler.bind(this)}
60
+ style={{
61
+ top: 0,
62
+ right: 0,
63
+ bottom: 0,
64
+ width: track.height,
65
+ }}
66
+ />
67
+ <div
68
+ className={styles['gallery-sub-track']}
69
+ onMouseEnter={this.mouseEnterHandler.bind(this)}
70
+ style={{
71
+ right: 0,
72
+ bottom: 0,
73
+ left: 0,
74
+ height: track.height,
75
+ }}
76
+ />
77
+ <div
78
+ className={styles['gallery-sub-track']}
79
+ onMouseEnter={this.mouseEnterHandler.bind(this)}
80
+ style={{
81
+ top: 0,
82
+ bottom: 0,
83
+ left: 0,
84
+ width: track.height,
85
+ }}
86
+ />
37
87
  <div
38
- key={track.uid || index}
39
- className={styles['gallery-track']}
88
+ className={styles['gallery-invisible-track']}
40
89
  onMouseLeave={this.mouseLeaveHandler.bind(this)}
41
90
  style={{
42
- top: track.height * index,
43
- right: track.height * index,
44
- bottom: track.height * index,
45
- left: track.height * index,
91
+ top: track.height,
92
+ right: track.height,
93
+ bottom: track.height,
94
+ left: track.height,
46
95
  }}
47
- >
48
- <div
49
- className={styles['gallery-sub-track']}
50
- onMouseEnter={this.mouseEnterHandler.bind(this)}
51
- style={{
52
- top: 0,
53
- right: 0,
54
- left: 0,
55
- height: track.height,
56
- }}
57
- />
58
- <div
59
- className={styles['gallery-sub-track']}
60
- onMouseEnter={this.mouseEnterHandler.bind(this)}
61
- style={{
62
- top: 0,
63
- right: 0,
64
- bottom: 0,
65
- width: track.height,
66
- }}
67
- />
68
- <div
69
- className={styles['gallery-sub-track']}
70
- onMouseEnter={this.mouseEnterHandler.bind(this)}
71
- style={{
72
- right: 0,
73
- bottom: 0,
74
- left: 0,
75
- height: track.height,
76
- }}
77
- />
78
- <div
79
- className={styles['gallery-sub-track']}
80
- onMouseEnter={this.mouseEnterHandler.bind(this)}
81
- style={{
82
- top: 0,
83
- bottom: 0,
84
- left: 0,
85
- width: track.height,
86
- }}
87
- />
88
- <div
89
- className={styles['gallery-invisible-track']}
90
- onMouseLeave={this.mouseLeaveHandler.bind(this)}
91
- style={{
92
- top: track.height,
93
- right: track.height,
94
- bottom: track.height,
95
- left: track.height,
96
- }}
96
+ />
97
+ {this.props.editable && (
98
+ <TrackControl
99
+ configMenuVisible={true}
100
+ imgStyleAdd={STYLES}
101
+ imgStyleClose={STYLES}
102
+ imgStyleMove={STYLES}
103
+ imgStyleSettings={STYLES}
104
+ isMoveable={false}
105
+ isVisible={this.state.hovering}
106
+ onCloseTrackMenuOpened={this.props.onCloseTrackMenuOpened}
107
+ onConfigTrackMenuOpened={this.props.onConfigTrackMenuOpened}
108
+ uid={track.uid || index}
97
109
  />
98
- {this.props.editable && (
99
- <TrackControl
100
- configMenuVisible={true}
101
- imgStyleAdd={STYLES}
102
- imgStyleClose={STYLES}
103
- imgStyleMove={STYLES}
104
- imgStyleSettings={STYLES}
105
- isMoveable={false}
106
- isVisible={this.state.hovering}
107
- onCloseTrackMenuOpened={this.props.onCloseTrackMenuOpened}
108
- onConfigTrackMenuOpened={this.props.onConfigTrackMenuOpened}
109
- uid={track.uid || index}
110
- />
111
- )}
112
- </div>
113
- ))}
110
+ )}
111
+ </div>
112
+ ))}
114
113
  </div>
115
114
  );
116
115
  }
@@ -1,30 +1,30 @@
1
1
  // @ts-nocheck
2
+ import clsx from 'clsx';
2
3
  import { select } from 'd3-selection';
4
+ import PropTypes from 'prop-types';
3
5
  import React from 'react';
4
6
  import slugid from 'slugid';
5
- import PropTypes from 'prop-types';
6
- import clsx from 'clsx';
7
7
 
8
8
  import Autocomplete from './Autocomplete';
9
9
  import ChromosomeInfo from './ChromosomeInfo';
10
- import SearchField from './SearchField';
11
10
  import PopupMenu from './PopupMenu';
11
+ import SearchField from './SearchField';
12
12
 
13
+ import withPubSub from './hocs/with-pub-sub';
13
14
  // Services
14
15
  import { tileProxy } from './services';
15
- import withPubSub from './hocs/with-pub-sub';
16
16
 
17
17
  // Utils
18
- import { scalesCenterAndK, dictKeys, toVoid } from './utils';
18
+ import { dictKeys, scalesCenterAndK, toVoid } from './utils';
19
19
 
20
+ // Configs
21
+ import { THEME_DARK, ZOOM_TRANSITION_DURATION } from './configs';
20
22
  // HOCS
21
23
  import withTheme from './hocs/with-theme';
22
24
  import { SearchIcon } from './icons';
23
- // Configs
24
- import { THEME_DARK, ZOOM_TRANSITION_DURATION } from './configs';
25
25
 
26
26
  // Styles
27
- import styles from '../styles/GenomePositionSearchBox.module.scss'; // eslint-disable-line no-unused-vars
27
+ import styles from '../styles/GenomePositionSearchBox.module.scss';
28
28
 
29
29
  class GenomePositionSearchBox extends React.Component {
30
30
  constructor(props) {
@@ -537,7 +537,8 @@ class GenomePositionSearchBox extends React.Component {
537
537
  }
538
538
  foundGeneSymbol = true; // we found a gene symbol
539
539
  break;
540
- } else if (k === j + 1) {
540
+ }
541
+ if (k === j + 1) {
541
542
  if (spacePart.length) {
542
543
  spacePart += '-';
543
544
  }
@@ -121,15 +121,16 @@ class HeatmapOptions extends React.Component {
121
121
  height: 10,
122
122
  }}
123
123
  >
124
+ <title>Remove</title>
124
125
  <use xlinkHref="#cross" />
125
126
  </svg>
126
127
  </div>
127
128
  ) : null; // removeButton
128
129
 
129
130
  return (
130
- /* eslint-disable react/no-array-index-key */
131
131
  // Colors may be repeated, so the array index is the best choice here.
132
132
  <div
133
+ // biome-ignore lint/suspicious/noArrayIndexKey:
133
134
  key={`l${i}`}
134
135
  style={{
135
136
  borderRadius: '1px',
@@ -140,6 +141,7 @@ class HeatmapOptions extends React.Component {
140
141
  >
141
142
  {removeButton}
142
143
  <SketchInlinePicker
144
+ // biome-ignore lint/suspicious/noArrayIndexKey:
143
145
  key={i}
144
146
  color={this.state.colors[i]}
145
147
  onChange={(c) => {
@@ -156,7 +158,6 @@ class HeatmapOptions extends React.Component {
156
158
  }}
157
159
  />
158
160
  </div>
159
- /* eslint-enable react/no-array-index-key */
160
161
  );
161
162
  })
162
163
  .reverse();
@@ -192,6 +193,7 @@ class HeatmapOptions extends React.Component {
192
193
  }}
193
194
  width="10px"
194
195
  >
196
+ <title>Add</title>
195
197
  <use xlinkHref="#plus" />
196
198
  </svg>
197
199
  </div>