@jbrowse/plugin-dotplot-view 2.6.3 → 2.7.1

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 (68) hide show
  1. package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +3 -4
  2. package/dist/DotplotDisplay/components/DotplotDisplay.js +3 -3
  3. package/dist/DotplotDisplay/stateModelFactory.d.ts +4 -4
  4. package/dist/DotplotDisplay/stateModelFactory.js +3 -3
  5. package/dist/DotplotRenderer/DotplotRenderer.js +12 -4
  6. package/dist/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
  7. package/dist/DotplotRenderer/components/DotplotRendering.js +3 -3
  8. package/dist/DotplotView/blockTypes.d.ts +1 -9
  9. package/dist/DotplotView/blockTypes.js +2 -15
  10. package/dist/DotplotView/components/Axes.js +37 -35
  11. package/dist/DotplotView/components/DotplotControls.d.ts +6 -0
  12. package/dist/DotplotView/components/DotplotControls.js +94 -0
  13. package/dist/DotplotView/components/DotplotTooltip.d.ts +0 -1
  14. package/dist/DotplotView/components/DotplotTooltip.js +1 -2
  15. package/dist/DotplotView/components/DotplotWarnings.d.ts +2 -2
  16. package/dist/DotplotView/components/DotplotWarnings.js +2 -1
  17. package/dist/DotplotView/components/Header.d.ts +2 -2
  18. package/dist/DotplotView/components/Header.js +5 -120
  19. package/dist/DotplotView/components/ImportCustomTrack.d.ts +1 -1
  20. package/dist/DotplotView/components/ImportCustomTrack.js +1 -1
  21. package/dist/DotplotView/components/ImportSyntenyTrackSelector.js +4 -1
  22. package/dist/DotplotView/components/PanButtons.d.ts +2 -2
  23. package/dist/DotplotView/components/PanButtons.js +2 -1
  24. package/dist/DotplotView/components/WarningDialog.d.ts +2 -2
  25. package/dist/DotplotView/components/WarningDialog.js +2 -1
  26. package/dist/DotplotView/components/util.js +2 -5
  27. package/dist/DotplotView/model.d.ts +13 -8
  28. package/dist/DotplotView/model.js +4 -1
  29. package/dist/DotplotView/svgcomponents/SVGBackground.js +2 -2
  30. package/dist/ServerSideRenderedBlockContent.d.ts +2 -2
  31. package/dist/ServerSideRenderedBlockContent.js +2 -1
  32. package/dist/ServerSideSyntenyRendering.d.ts +11 -16
  33. package/dist/ServerSideSyntenyRendering.js +3 -11
  34. package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +3 -4
  35. package/esm/DotplotDisplay/components/DotplotDisplay.js +3 -3
  36. package/esm/DotplotDisplay/stateModelFactory.d.ts +4 -4
  37. package/esm/DotplotDisplay/stateModelFactory.js +3 -3
  38. package/esm/DotplotRenderer/DotplotRenderer.js +12 -4
  39. package/esm/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
  40. package/esm/DotplotRenderer/components/DotplotRendering.js +3 -3
  41. package/esm/DotplotView/blockTypes.d.ts +1 -9
  42. package/esm/DotplotView/blockTypes.js +2 -15
  43. package/esm/DotplotView/components/Axes.js +37 -35
  44. package/esm/DotplotView/components/DotplotControls.d.ts +6 -0
  45. package/esm/DotplotView/components/DotplotControls.js +89 -0
  46. package/esm/DotplotView/components/DotplotTooltip.d.ts +0 -1
  47. package/esm/DotplotView/components/DotplotTooltip.js +1 -1
  48. package/esm/DotplotView/components/DotplotView.js +1 -1
  49. package/esm/DotplotView/components/DotplotWarnings.d.ts +2 -2
  50. package/esm/DotplotView/components/DotplotWarnings.js +2 -1
  51. package/esm/DotplotView/components/Header.d.ts +2 -2
  52. package/esm/DotplotView/components/Header.js +5 -97
  53. package/esm/DotplotView/components/ImportCustomTrack.d.ts +1 -1
  54. package/esm/DotplotView/components/ImportCustomTrack.js +1 -1
  55. package/esm/DotplotView/components/ImportSyntenyTrackSelector.js +4 -1
  56. package/esm/DotplotView/components/PanButtons.d.ts +2 -2
  57. package/esm/DotplotView/components/PanButtons.js +2 -1
  58. package/esm/DotplotView/components/WarningDialog.d.ts +2 -2
  59. package/esm/DotplotView/components/WarningDialog.js +2 -1
  60. package/esm/DotplotView/components/util.js +2 -5
  61. package/esm/DotplotView/model.d.ts +13 -8
  62. package/esm/DotplotView/model.js +4 -1
  63. package/esm/DotplotView/svgcomponents/SVGBackground.js +2 -2
  64. package/esm/ServerSideRenderedBlockContent.d.ts +2 -2
  65. package/esm/ServerSideRenderedBlockContent.js +2 -1
  66. package/esm/ServerSideSyntenyRendering.d.ts +11 -16
  67. package/esm/ServerSideSyntenyRendering.js +4 -12
  68. package/package.json +3 -4
@@ -7,7 +7,7 @@ import normalizeWheel from 'normalize-wheel';
7
7
  import ImportForm from './ImportForm';
8
8
  import Header from './Header';
9
9
  import Grid from './Grid';
10
- import { HorizontalAxis, VerticalAxis } from './Axes';
10
+ import { VerticalAxis, HorizontalAxis } from './Axes';
11
11
  import { TooltipWhereClicked, TooltipWhereMouseovered } from './DotplotTooltip';
12
12
  const blank = { left: 0, top: 0, width: 0, height: 0 };
13
13
  const useStyles = makeStyles()(theme => ({
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DotplotViewModel } from '../model';
3
- declare const _default: ({ model }: {
3
+ declare const DotplotWarnings: ({ model, }: {
4
4
  model: DotplotViewModel;
5
5
  }) => React.JSX.Element | null;
6
- export default _default;
6
+ export default DotplotWarnings;
@@ -3,7 +3,7 @@ import { Alert, Button } from '@mui/material';
3
3
  import { observer } from 'mobx-react';
4
4
  // lazy components
5
5
  const WarningDialog = lazy(() => import('./WarningDialog'));
6
- export default observer(function ({ model }) {
6
+ const DotplotWarnings = observer(function ({ model, }) {
7
7
  const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
8
8
  const [shown, setShown] = useState(false);
9
9
  return trackWarnings.length ? (React.createElement(Alert, { severity: "warning" },
@@ -12,3 +12,4 @@ export default observer(function ({ model }) {
12
12
  React.createElement(Button, { onClick: () => setShown(true) }, "More info"),
13
13
  shown ? (React.createElement(WarningDialog, { trackWarnings: trackWarnings, handleClose: () => setShown(false) })) : null)) : null;
14
14
  });
15
+ export default DotplotWarnings;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { DotplotViewModel } from '../model';
3
- declare const _default: ({ model, selection, }: {
3
+ declare const DotplotHeader: ({ model, selection, }: {
4
4
  model: DotplotViewModel;
5
5
  selection?: {
6
6
  width: number;
7
7
  height: number;
8
8
  } | undefined;
9
9
  }) => React.JSX.Element;
10
- export default _default;
10
+ export default DotplotHeader;
@@ -1,21 +1,12 @@
1
- import React, { useState } from 'react';
2
- import { IconButton, Typography } from '@mui/material';
1
+ import React from 'react';
2
+ import { Typography } from '@mui/material';
3
3
  import { observer } from 'mobx-react';
4
4
  import { makeStyles } from 'tss-react/mui';
5
5
  import { getBpDisplayStr } from '@jbrowse/core/util';
6
- import { Menu } from '@jbrowse/core/ui';
7
- // icons
8
- import ZoomOut from '@mui/icons-material/ZoomOut';
9
- import ZoomIn from '@mui/icons-material/ZoomIn';
10
- import MoreVert from '@mui/icons-material/MoreVert';
11
- import { CursorMouse, CursorMove } from './CursorIcon';
12
- import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
13
6
  import DotplotWarnings from './DotplotWarnings';
14
7
  import PanButtons from './PanButtons';
8
+ import DotplotControls from './DotplotControls';
15
9
  const useStyles = makeStyles()({
16
- iconButton: {
17
- margin: 5,
18
- },
19
10
  bp: {
20
11
  display: 'flex',
21
12
  alignItems: 'center',
@@ -29,91 +20,7 @@ const useStyles = makeStyles()({
29
20
  position: 'relative',
30
21
  },
31
22
  });
32
- const DotplotControls = observer(({ model }) => {
33
- const { classes } = useStyles();
34
- const [menuAnchorEl, setMenuAnchorEl] = useState();
35
- return (React.createElement("div", null,
36
- React.createElement(IconButton, { onClick: model.zoomOutButton, className: classes.iconButton },
37
- React.createElement(ZoomOut, null)),
38
- React.createElement(IconButton, { onClick: model.zoomInButton, className: classes.iconButton },
39
- React.createElement(ZoomIn, null)),
40
- React.createElement(IconButton, { onClick: () => model.activateTrackSelector(), className: classes.iconButton, title: "Open track selector", "data-testid": "circular_track_select" },
41
- React.createElement(TrackSelectorIcon, null)),
42
- React.createElement(IconButton, { onClick: event => setMenuAnchorEl(event.currentTarget), className: classes.iconButton },
43
- React.createElement(MoreVert, null)),
44
- menuAnchorEl ? (React.createElement(Menu, { anchorEl: menuAnchorEl, open: true, onMenuItemClick: (_event, callback) => {
45
- callback();
46
- setMenuAnchorEl(undefined);
47
- }, menuItems: [
48
- {
49
- onClick: () => model.squareView(),
50
- label: 'Square view - same base pairs per pixel',
51
- },
52
- {
53
- onClick: () => model.squareViewProportional(),
54
- label: 'Rectanglularize view - same total bp',
55
- },
56
- {
57
- onClick: () => model.showAllRegions(),
58
- label: 'Show all regions',
59
- },
60
- {
61
- onClick: () => model.setDrawCigar(!model.drawCigar),
62
- type: 'checkbox',
63
- label: 'Draw CIGAR',
64
- checked: model.drawCigar,
65
- },
66
- {
67
- onClick: () => model.setShowPanButtons(!model.showPanButtons),
68
- label: 'Show pan buttons',
69
- type: 'checkbox',
70
- checked: model.showPanButtons,
71
- },
72
- {
73
- label: 'Click and drag mode',
74
- subMenu: [
75
- {
76
- onClick: () => model.setCursorMode('move'),
77
- label: 'Pan by default, select region when ctrl key is held',
78
- icon: CursorMove,
79
- type: 'radio',
80
- checked: model.cursorMode === 'move',
81
- },
82
- {
83
- onClick: () => model.setCursorMode('crosshair'),
84
- label: 'Select region by default, pan when ctrl key is held',
85
- icon: CursorMouse,
86
- type: 'radio',
87
- checked: model.cursorMode === 'crosshair',
88
- },
89
- ],
90
- },
91
- {
92
- label: 'Wheel scroll mode',
93
- subMenu: [
94
- {
95
- onClick: () => model.setWheelMode('pan'),
96
- label: 'Pans view',
97
- type: 'radio',
98
- checked: model.wheelMode === 'pan',
99
- },
100
- {
101
- onClick: () => model.setWheelMode('zoom'),
102
- label: 'Zooms view',
103
- type: 'radio',
104
- checked: model.wheelMode === 'zoom',
105
- },
106
- {
107
- onClick: () => model.setWheelMode('none'),
108
- label: 'Disable',
109
- type: 'radio',
110
- checked: model.wheelMode === 'none',
111
- },
112
- ],
113
- },
114
- ], onClose: () => setMenuAnchorEl(undefined) })) : null));
115
- });
116
- export default observer(function Header({ model, selection, }) {
23
+ const DotplotHeader = observer(function ({ model, selection, }) {
117
24
  const { classes } = useStyles();
118
25
  const { hview, vview, showPanButtons } = model;
119
26
  return (React.createElement("div", { className: classes.headerBar },
@@ -137,3 +44,4 @@ export default observer(function Header({ model, selection, }) {
137
44
  React.createElement(DotplotWarnings, { model: model }),
138
45
  showPanButtons ? React.createElement(PanButtons, { model: model }) : null));
139
46
  });
47
+ export default DotplotHeader;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { SnapshotIn } from 'mobx-state-tree';
3
3
  import { AnyConfigurationModel } from '@jbrowse/core/configuration';
4
4
  type Conf = SnapshotIn<AnyConfigurationModel>;
5
- declare const OpenTrack: ({ sessionTrackData, assembly1, assembly2, setSessionTrackData, }: {
5
+ declare const OpenTrack: ({ assembly1, assembly2, setSessionTrackData, }: {
6
6
  sessionTrackData: Conf;
7
7
  assembly1: string;
8
8
  assembly2: string;
@@ -71,7 +71,7 @@ function getAdapter({ radioOption, assembly1, assembly2, fileLocation, bed1Locat
71
71
  throw new Error('Unknown type');
72
72
  }
73
73
  }
74
- const OpenTrack = observer(({ sessionTrackData, assembly1, assembly2, setSessionTrackData, }) => {
74
+ const OpenTrack = observer(({ assembly1, assembly2, setSessionTrackData, }) => {
75
75
  const [bed2Location, setBed2Location] = useState();
76
76
  const [bed1Location, setBed1Location] = useState();
77
77
  const [fileLocation, setFileLocation] = useState();
@@ -17,7 +17,10 @@ const Selector = observer(({ model, assembly1, assembly2, setShowTrackId, }) =>
17
17
  var _a;
18
18
  const session = getSession(model);
19
19
  const { tracks, sessionTracks } = session;
20
- const allTracks = [...tracks, ...sessionTracks];
20
+ const allTracks = [
21
+ ...tracks,
22
+ ...(sessionTracks || []),
23
+ ];
21
24
  const filteredTracks = allTracks.filter(t => f(t, assembly2, assembly1));
22
25
  const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
23
26
  const [value, setValue] = useState(resetTrack);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DotplotViewModel } from '../model';
3
- declare const _default: ({ model, }: {
3
+ declare const PanButtons: ({ model, }: {
4
4
  model: DotplotViewModel;
5
5
  }) => React.JSX.Element;
6
- export default _default;
6
+ export default PanButtons;
@@ -24,7 +24,7 @@ const useStyles = makeStyles()({
24
24
  margin: 0,
25
25
  },
26
26
  });
27
- export default observer(function PanButtons({ model, }) {
27
+ const PanButtons = observer(function PanButtons({ model, }) {
28
28
  const { classes } = useStyles();
29
29
  return (React.createElement(Paper, { className: classes.dpad, elevation: 6 },
30
30
  React.createElement("div", null),
@@ -52,3 +52,4 @@ export default observer(function PanButtons({ model, }) {
52
52
  } },
53
53
  React.createElement(ZoomOut, null))));
54
54
  });
55
+ export default PanButtons;
@@ -9,8 +9,8 @@ interface TrackWarning {
9
9
  }[];
10
10
  }[];
11
11
  }
12
- declare const _default: ({ trackWarnings, handleClose, }: {
12
+ declare const WarningDialog: ({ trackWarnings, handleClose, }: {
13
13
  handleClose: () => void;
14
14
  trackWarnings: TrackWarning[];
15
15
  }) => React.JSX.Element;
16
- export default _default;
16
+ export default WarningDialog;
@@ -11,7 +11,7 @@ const useStyles = makeStyles()({
11
11
  minWidth: 600,
12
12
  },
13
13
  });
14
- export default observer(function WarningDialog({ trackWarnings, handleClose, }) {
14
+ const WarningDialog = observer(function WarningDialog({ trackWarnings, handleClose, }) {
15
15
  const { classes } = useStyles();
16
16
  const rows = [];
17
17
  for (let i = 0; i < trackWarnings.length; i++) {
@@ -33,3 +33,4 @@ export default observer(function WarningDialog({ trackWarnings, handleClose, })
33
33
  React.createElement("div", { style: { height: 600, width: '100%', overflow: 'auto' } },
34
34
  React.createElement(DataGrid, { rows: rows, columns: columns, disableRowSelectionOnClick: true, rowHeight: 25, disableColumnMenu: true })))));
35
35
  });
36
+ export default WarningDialog;
@@ -60,9 +60,7 @@ export function makeTicks(regions, bpPerPx, emitMajor = true, emitMinor = true)
60
60
  const ticks = [];
61
61
  const gridPitch = chooseGridPitch(bpPerPx, 60, 15);
62
62
  const iterPitch = gridPitch.minorPitch || gridPitch.majorPitch;
63
- for (let i = 0; i < regions.length; i++) {
64
- const region = regions[i];
65
- const { start, end, refName } = region;
63
+ for (const { start, end, refName } of regions) {
66
64
  let index = 0;
67
65
  const minBase = start;
68
66
  const maxBase = end;
@@ -71,8 +69,7 @@ export function makeTicks(regions, bpPerPx, emitMajor = true, emitMinor = true)
71
69
  ticks.push({ type: 'minor', base: base - 1, index, refName });
72
70
  index += 1;
73
71
  }
74
- else if (emitMajor &&
75
- Math.abs(base - region.start) > gridPitch.minorPitch) {
72
+ else if (emitMajor && Math.abs(base - start) > gridPitch.minorPitch) {
76
73
  ticks.push({ type: 'major', base: base - 1, index, refName });
77
74
  index += 1;
78
75
  }
@@ -213,28 +213,33 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
213
213
  readonly textSearchAdapter: any;
214
214
  readonly adapterType: import("@jbrowse/core/pluggableElementTypes").AdapterType;
215
215
  readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
216
- readonly canConfigure: any;
216
+ readonly canConfigure: boolean | ({
217
+ [x: string]: any;
218
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
219
+ setSubschema(slotName: string, data: unknown): any;
220
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
217
221
  } & {
218
222
  setMinimized(flag: boolean): void;
219
- activateConfigurationUI(): void;
220
- showDisplay(displayId: string, initialSnapshot?: {} | undefined): void;
221
- hideDisplay(displayId: string): number;
222
- replaceDisplay(oldId: string, newId: string, initialSnapshot?: {} | undefined): void; /**
223
+ showDisplay(displayId: string, initialSnapshot?: {} | undefined): void; /**
223
224
  * #property
224
225
  */
226
+ hideDisplay(displayId: string): number;
227
+ replaceDisplay(oldId: string, newId: string, initialSnapshot?: {} | undefined): void;
225
228
  } & {
226
229
  trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
227
- type: string; /**
230
+ type: string;
231
+ label: string; /**
228
232
  * #property
229
233
  */
230
- label: string;
231
234
  subMenu: {
232
235
  type: string;
233
236
  label: string;
234
237
  checked: boolean;
235
238
  onClick: () => void;
236
239
  }[];
237
- })[];
240
+ })[]; /**
241
+ * #property
242
+ */
238
243
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
239
244
  viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
240
245
  }, {
@@ -478,8 +478,11 @@ export default function stateModelFactory(pm) {
478
478
  },
479
479
  // if any of our assemblies are temporary assemblies
480
480
  beforeDestroy() {
481
+ var _a;
481
482
  const session = getSession(self);
482
- self.assemblyNames.forEach(asm => session.removeTemporaryAssembly(asm));
483
+ for (const name in self.assemblyNames) {
484
+ (_a = session.removeTemporaryAssembly) === null || _a === void 0 ? void 0 : _a.call(session, name);
485
+ }
483
486
  },
484
487
  afterAttach() {
485
488
  addDisposer(self, autorun(() => {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import Color from 'color';
3
2
  import { useTheme } from '@mui/material';
3
+ import { stripAlpha } from '@jbrowse/core/util';
4
4
  export default function SVGBackground({ width, height, }) {
5
5
  const theme = useTheme();
6
- return (React.createElement("rect", { x: 0, y: 0, width: width, height: height, fill: Color(theme.palette.background.default).hex() }));
6
+ return (React.createElement("rect", { x: 0, y: 0, width: width, height: height, fill: stripAlpha(theme.palette.background.default) }));
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import React, { CSSProperties } from 'react';
2
- declare const _default: ({ model, style, }: {
2
+ declare const ServerSideRenderedDotplotContent: ({ model, style, }: {
3
3
  model: {
4
4
  error?: unknown;
5
5
  message?: string;
@@ -9,4 +9,4 @@ declare const _default: ({ model, style, }: {
9
9
  };
10
10
  style: CSSProperties;
11
11
  }) => React.JSX.Element | null;
12
- export default _default;
12
+ export default ServerSideRenderedDotplotContent;
@@ -44,7 +44,7 @@ function BlockError({ error }) {
44
44
  return (React.createElement("div", { className: classes.blockError },
45
45
  React.createElement(Typography, null, `${error}`)));
46
46
  }
47
- export default observer(function ({ model, style, }) {
47
+ const ServerSideRenderedDotplotContent = observer(function ({ model, style, }) {
48
48
  if (model.error) {
49
49
  return React.createElement(BlockError, { error: model.error, "data-testid": "reload_button" });
50
50
  }
@@ -59,3 +59,4 @@ export default observer(function ({ model, style, }) {
59
59
  }
60
60
  return null;
61
61
  });
62
+ export default ServerSideRenderedDotplotContent;
@@ -3,21 +3,16 @@ import React from 'react';
3
3
  * A block whose content is rendered outside of the main thread and hydrated by this
4
4
  * component.
5
5
  */
6
- declare function ServerSideSyntenyRendering({ model, }: {
7
- model: {
8
- imageData: string;
9
- style: Record<string, string>;
10
- renderProps: {
11
- width: number;
12
- height: number;
13
- highResolutionScaling?: number;
14
- };
15
- };
16
- }): React.JSX.Element;
17
- declare namespace ServerSideSyntenyRendering {
18
- var propTypes: {
19
- model: import("prop-types").Validator<any>;
6
+ interface ModelType {
7
+ imageData: string;
8
+ style: Record<string, string>;
9
+ renderProps: {
10
+ width: number;
11
+ height: number;
12
+ highResolutionScaling?: number;
20
13
  };
21
14
  }
22
- declare const _default: typeof ServerSideSyntenyRendering;
23
- export default _default;
15
+ declare const ServerSideSyntenyRendering: ({ model, }: {
16
+ model: ModelType;
17
+ }) => React.JSX.Element;
18
+ export default ServerSideSyntenyRendering;
@@ -1,12 +1,7 @@
1
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
1
  import React, { useRef, useState, useEffect } from 'react';
3
- import { observer, PropTypes } from 'mobx-react';
2
+ import { observer } from 'mobx-react';
4
3
  import { drawImageOntoCanvasContext } from '@jbrowse/core/util/offscreenCanvasPonyfill';
5
- /**
6
- * A block whose content is rendered outside of the main thread and hydrated by this
7
- * component.
8
- */
9
- function ServerSideSyntenyRendering({ model, }) {
4
+ const ServerSideSyntenyRendering = observer(function ({ model, }) {
10
5
  const { imageData, style, renderProps } = model;
11
6
  const { width, height, highResolutionScaling = 1 } = renderProps;
12
7
  const featureCanvas = useRef(null);
@@ -21,8 +16,5 @@ function ServerSideSyntenyRendering({ model, }) {
21
16
  setDone(true);
22
17
  }, [height, imageData, width]);
23
18
  return (React.createElement("canvas", { "data-testid": `prerendered_canvas${done ? '_done' : ''}`, ref: featureCanvas, width: width * highResolutionScaling, height: height * highResolutionScaling, style: { width, height, ...style } }));
24
- }
25
- ServerSideSyntenyRendering.propTypes = {
26
- model: PropTypes.observableObject.isRequired,
27
- };
28
- export default observer(ServerSideSyntenyRendering);
19
+ });
20
+ export default ServerSideSyntenyRendering;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-dotplot-view",
3
- "version": "2.6.3",
3
+ "version": "2.7.1",
4
4
  "description": "JBrowse 2 dotplot view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -42,7 +42,6 @@
42
42
  "@types/file-saver": "^2.0.1",
43
43
  "@types/normalize-wheel": "^1.0.0",
44
44
  "clone": "^2.1.2",
45
- "color": "^3.1.3",
46
45
  "file-saver": "^2.0.0",
47
46
  "normalize-wheel": "^1.0.1",
48
47
  "react-popper": "^2.0.0"
@@ -52,7 +51,7 @@
52
51
  "@jbrowse/plugin-alignments": "^2.0.0",
53
52
  "@mui/material": "^5.0.0",
54
53
  "mobx": "^6.0.0",
55
- "mobx-react": "^7.0.0",
54
+ "mobx-react": "^9.0.0",
56
55
  "mobx-state-tree": "^5.0.0",
57
56
  "react": ">=16.8.0",
58
57
  "react-dom": ">=16.8.0",
@@ -65,5 +64,5 @@
65
64
  "publishConfig": {
66
65
  "access": "public"
67
66
  },
68
- "gitHead": "ed402c87efb0904858d602c363bd1757d5742129"
67
+ "gitHead": "2cda1611eebd12517f2a3cfc1b612face27005d4"
69
68
  }