@jbrowse/plugin-dotplot-view 2.6.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 (263) hide show
  1. package/LICENSE +201 -0
  2. package/dist/ComparativeRenderer/index.d.ts +27 -0
  3. package/dist/ComparativeRenderer/index.js +59 -0
  4. package/dist/ComparativeRenderer/index.js.map +1 -0
  5. package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +8 -0
  6. package/dist/DotplotDisplay/components/DotplotDisplay.js +24 -0
  7. package/dist/DotplotDisplay/components/DotplotDisplay.js.map +1 -0
  8. package/dist/DotplotDisplay/index.d.ts +12 -0
  9. package/dist/DotplotDisplay/index.js +48 -0
  10. package/dist/DotplotDisplay/index.js.map +1 -0
  11. package/dist/DotplotDisplay/renderDotplotBlock.d.ts +11 -0
  12. package/dist/DotplotDisplay/renderDotplotBlock.js +57 -0
  13. package/dist/DotplotDisplay/renderDotplotBlock.js.map +1 -0
  14. package/dist/DotplotDisplay/stateModelFactory.d.ts +138 -0
  15. package/dist/DotplotDisplay/stateModelFactory.js +165 -0
  16. package/dist/DotplotDisplay/stateModelFactory.js.map +1 -0
  17. package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +3 -0
  18. package/dist/DotplotReadVsRef/DotplotReadVsRef.js +102 -0
  19. package/dist/DotplotReadVsRef/DotplotReadVsRef.js.map +1 -0
  20. package/dist/DotplotReadVsRef/index.d.ts +2 -0
  21. package/dist/DotplotReadVsRef/index.js +42 -0
  22. package/dist/DotplotReadVsRef/index.js.map +1 -0
  23. package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +27 -0
  24. package/dist/DotplotRenderer/ComparativeRenderRpc.js +59 -0
  25. package/dist/DotplotRenderer/ComparativeRenderRpc.js.map +1 -0
  26. package/dist/DotplotRenderer/DotplotRenderer.d.ts +69 -0
  27. package/dist/DotplotRenderer/DotplotRenderer.js +274 -0
  28. package/dist/DotplotRenderer/DotplotRenderer.js.map +1 -0
  29. package/dist/DotplotRenderer/components/DotplotRendering.d.ts +5 -0
  30. package/dist/DotplotRenderer/components/DotplotRendering.js +13 -0
  31. package/dist/DotplotRenderer/components/DotplotRendering.js.map +1 -0
  32. package/dist/DotplotRenderer/configSchema.d.ts +61 -0
  33. package/dist/DotplotRenderer/configSchema.js +83 -0
  34. package/dist/DotplotRenderer/configSchema.js.map +1 -0
  35. package/dist/DotplotRenderer/index.d.ts +3 -0
  36. package/dist/DotplotRenderer/index.js +17 -0
  37. package/dist/DotplotRenderer/index.js.map +1 -0
  38. package/dist/DotplotView/1dview.d.ts +307 -0
  39. package/dist/DotplotView/1dview.js +95 -0
  40. package/dist/DotplotView/1dview.js.map +1 -0
  41. package/dist/DotplotView/blockTypes.d.ts +61 -0
  42. package/dist/DotplotView/blockTypes.js +117 -0
  43. package/dist/DotplotView/blockTypes.js.map +1 -0
  44. package/dist/DotplotView/components/Axes.d.ts +14 -0
  45. package/dist/DotplotView/components/Axes.js +127 -0
  46. package/dist/DotplotView/components/Axes.js.map +1 -0
  47. package/dist/DotplotView/components/CursorIcon.d.ts +4 -0
  48. package/dist/DotplotView/components/CursorIcon.js +19 -0
  49. package/dist/DotplotView/components/CursorIcon.js.map +1 -0
  50. package/dist/DotplotView/components/DotplotTooltip.d.ts +19 -0
  51. package/dist/DotplotView/components/DotplotTooltip.js +128 -0
  52. package/dist/DotplotView/components/DotplotTooltip.js.map +1 -0
  53. package/dist/DotplotView/components/DotplotView.d.ts +6 -0
  54. package/dist/DotplotView/components/DotplotView.js +272 -0
  55. package/dist/DotplotView/components/DotplotView.js.map +1 -0
  56. package/dist/DotplotView/components/DotplotWarnings.d.ts +6 -0
  57. package/dist/DotplotView/components/DotplotWarnings.js +40 -0
  58. package/dist/DotplotView/components/DotplotWarnings.js.map +1 -0
  59. package/dist/DotplotView/components/ExportSvgDialog.d.ts +8 -0
  60. package/dist/DotplotView/components/ExportSvgDialog.js +76 -0
  61. package/dist/DotplotView/components/ExportSvgDialog.js.map +1 -0
  62. package/dist/DotplotView/components/Grid.d.ts +10 -0
  63. package/dist/DotplotView/components/Grid.js +60 -0
  64. package/dist/DotplotView/components/Grid.js.map +1 -0
  65. package/dist/DotplotView/components/Header.d.ts +10 -0
  66. package/dist/DotplotView/components/Header.js +168 -0
  67. package/dist/DotplotView/components/Header.js.map +1 -0
  68. package/dist/DotplotView/components/ImportCustomTrack.d.ts +11 -0
  69. package/dist/DotplotView/components/ImportCustomTrack.js +180 -0
  70. package/dist/DotplotView/components/ImportCustomTrack.js.map +1 -0
  71. package/dist/DotplotView/components/ImportForm.d.ts +6 -0
  72. package/dist/DotplotView/components/ImportForm.js +121 -0
  73. package/dist/DotplotView/components/ImportForm.js.map +1 -0
  74. package/dist/DotplotView/components/ImportSyntenyTrackSelector.d.ts +9 -0
  75. package/dist/DotplotView/components/ImportSyntenyTrackSelector.js +69 -0
  76. package/dist/DotplotView/components/ImportSyntenyTrackSelector.js.map +1 -0
  77. package/dist/DotplotView/components/PanButtons.d.ts +6 -0
  78. package/dist/DotplotView/components/PanButtons.js +60 -0
  79. package/dist/DotplotView/components/PanButtons.js.map +1 -0
  80. package/dist/DotplotView/components/WarningDialog.d.ts +16 -0
  81. package/dist/DotplotView/components/WarningDialog.js +41 -0
  82. package/dist/DotplotView/components/WarningDialog.js.map +1 -0
  83. package/dist/DotplotView/components/util.d.ts +19 -0
  84. package/dist/DotplotView/components/util.js +90 -0
  85. package/dist/DotplotView/components/util.js.map +1 -0
  86. package/dist/DotplotView/index.d.ts +2 -0
  87. package/dist/DotplotView/index.js +44 -0
  88. package/dist/DotplotView/index.js.map +1 -0
  89. package/dist/DotplotView/model.d.ts +616 -0
  90. package/dist/DotplotView/model.js +647 -0
  91. package/dist/DotplotView/model.js.map +1 -0
  92. package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +5 -0
  93. package/dist/DotplotView/svgcomponents/SVGBackground.js +13 -0
  94. package/dist/DotplotView/svgcomponents/SVGBackground.js.map +1 -0
  95. package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +2 -0
  96. package/dist/DotplotView/svgcomponents/SVGDotplotView.js +47 -0
  97. package/dist/DotplotView/svgcomponents/SVGDotplotView.js.map +1 -0
  98. package/dist/LaunchDotplotView.d.ts +2 -0
  99. package/dist/LaunchDotplotView.js +45 -0
  100. package/dist/LaunchDotplotView.js.map +1 -0
  101. package/dist/ServerSideRenderedBlockContent.d.ts +12 -0
  102. package/dist/ServerSideRenderedBlockContent.js +87 -0
  103. package/dist/ServerSideRenderedBlockContent.js.map +1 -0
  104. package/dist/ServerSideSyntenyRendering.d.ts +23 -0
  105. package/dist/ServerSideSyntenyRendering.js +54 -0
  106. package/dist/ServerSideSyntenyRendering.js.map +1 -0
  107. package/dist/index.d.ts +7 -0
  108. package/dist/index.js +44 -0
  109. package/dist/index.js.map +1 -0
  110. package/dist/util.d.ts +9 -0
  111. package/dist/util.js +9 -0
  112. package/dist/util.js.map +1 -0
  113. package/esm/ComparativeRenderer/index.d.ts +27 -0
  114. package/esm/ComparativeRenderer/index.js +53 -0
  115. package/esm/ComparativeRenderer/index.js.map +1 -0
  116. package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +8 -0
  117. package/esm/DotplotDisplay/components/DotplotDisplay.js +19 -0
  118. package/esm/DotplotDisplay/components/DotplotDisplay.js.map +1 -0
  119. package/esm/DotplotDisplay/index.d.ts +12 -0
  120. package/esm/DotplotDisplay/index.js +41 -0
  121. package/esm/DotplotDisplay/index.js.map +1 -0
  122. package/esm/DotplotDisplay/renderDotplotBlock.d.ts +11 -0
  123. package/esm/DotplotDisplay/renderDotplotBlock.js +49 -0
  124. package/esm/DotplotDisplay/renderDotplotBlock.js.map +1 -0
  125. package/esm/DotplotDisplay/stateModelFactory.d.ts +138 -0
  126. package/esm/DotplotDisplay/stateModelFactory.js +158 -0
  127. package/esm/DotplotDisplay/stateModelFactory.js.map +1 -0
  128. package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +3 -0
  129. package/esm/DotplotReadVsRef/DotplotReadVsRef.js +98 -0
  130. package/esm/DotplotReadVsRef/DotplotReadVsRef.js.map +1 -0
  131. package/esm/DotplotReadVsRef/index.d.ts +2 -0
  132. package/esm/DotplotReadVsRef/index.js +36 -0
  133. package/esm/DotplotReadVsRef/index.js.map +1 -0
  134. package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +27 -0
  135. package/esm/DotplotRenderer/ComparativeRenderRpc.js +53 -0
  136. package/esm/DotplotRenderer/ComparativeRenderRpc.js.map +1 -0
  137. package/esm/DotplotRenderer/DotplotRenderer.d.ts +69 -0
  138. package/esm/DotplotRenderer/DotplotRenderer.js +268 -0
  139. package/esm/DotplotRenderer/DotplotRenderer.js.map +1 -0
  140. package/esm/DotplotRenderer/components/DotplotRendering.d.ts +5 -0
  141. package/esm/DotplotRenderer/components/DotplotRendering.js +8 -0
  142. package/esm/DotplotRenderer/components/DotplotRendering.js.map +1 -0
  143. package/esm/DotplotRenderer/configSchema.d.ts +61 -0
  144. package/esm/DotplotRenderer/configSchema.js +81 -0
  145. package/esm/DotplotRenderer/configSchema.js.map +1 -0
  146. package/esm/DotplotRenderer/index.d.ts +3 -0
  147. package/esm/DotplotRenderer/index.js +12 -0
  148. package/esm/DotplotRenderer/index.js.map +1 -0
  149. package/esm/DotplotView/1dview.d.ts +307 -0
  150. package/esm/DotplotView/1dview.js +87 -0
  151. package/esm/DotplotView/1dview.js.map +1 -0
  152. package/esm/DotplotView/blockTypes.d.ts +61 -0
  153. package/esm/DotplotView/blockTypes.js +109 -0
  154. package/esm/DotplotView/blockTypes.js.map +1 -0
  155. package/esm/DotplotView/components/Axes.d.ts +14 -0
  156. package/esm/DotplotView/components/Axes.js +121 -0
  157. package/esm/DotplotView/components/Axes.js.map +1 -0
  158. package/esm/DotplotView/components/CursorIcon.d.ts +4 -0
  159. package/esm/DotplotView/components/CursorIcon.js +11 -0
  160. package/esm/DotplotView/components/CursorIcon.js.map +1 -0
  161. package/esm/DotplotView/components/DotplotTooltip.d.ts +19 -0
  162. package/esm/DotplotView/components/DotplotTooltip.js +101 -0
  163. package/esm/DotplotView/components/DotplotTooltip.js.map +1 -0
  164. package/esm/DotplotView/components/DotplotView.d.ts +6 -0
  165. package/esm/DotplotView/components/DotplotView.js +244 -0
  166. package/esm/DotplotView/components/DotplotView.js.map +1 -0
  167. package/esm/DotplotView/components/DotplotWarnings.d.ts +6 -0
  168. package/esm/DotplotView/components/DotplotWarnings.js +15 -0
  169. package/esm/DotplotView/components/DotplotWarnings.js.map +1 -0
  170. package/esm/DotplotView/components/ExportSvgDialog.d.ts +8 -0
  171. package/esm/DotplotView/components/ExportSvgDialog.js +50 -0
  172. package/esm/DotplotView/components/ExportSvgDialog.js.map +1 -0
  173. package/esm/DotplotView/components/Grid.d.ts +10 -0
  174. package/esm/DotplotView/components/Grid.js +53 -0
  175. package/esm/DotplotView/components/Grid.js.map +1 -0
  176. package/esm/DotplotView/components/Header.d.ts +10 -0
  177. package/esm/DotplotView/components/Header.js +140 -0
  178. package/esm/DotplotView/components/Header.js.map +1 -0
  179. package/esm/DotplotView/components/ImportCustomTrack.d.ts +11 -0
  180. package/esm/DotplotView/components/ImportCustomTrack.js +152 -0
  181. package/esm/DotplotView/components/ImportCustomTrack.js.map +1 -0
  182. package/esm/DotplotView/components/ImportForm.d.ts +6 -0
  183. package/esm/DotplotView/components/ImportForm.js +93 -0
  184. package/esm/DotplotView/components/ImportForm.js.map +1 -0
  185. package/esm/DotplotView/components/ImportSyntenyTrackSelector.d.ts +9 -0
  186. package/esm/DotplotView/components/ImportSyntenyTrackSelector.js +44 -0
  187. package/esm/DotplotView/components/ImportSyntenyTrackSelector.js.map +1 -0
  188. package/esm/DotplotView/components/PanButtons.d.ts +6 -0
  189. package/esm/DotplotView/components/PanButtons.js +55 -0
  190. package/esm/DotplotView/components/PanButtons.js.map +1 -0
  191. package/esm/DotplotView/components/WarningDialog.d.ts +16 -0
  192. package/esm/DotplotView/components/WarningDialog.js +36 -0
  193. package/esm/DotplotView/components/WarningDialog.js.map +1 -0
  194. package/esm/DotplotView/components/util.d.ts +19 -0
  195. package/esm/DotplotView/components/util.js +83 -0
  196. package/esm/DotplotView/components/util.js.map +1 -0
  197. package/esm/DotplotView/index.d.ts +2 -0
  198. package/esm/DotplotView/index.js +15 -0
  199. package/esm/DotplotView/index.js.map +1 -0
  200. package/esm/DotplotView/model.d.ts +616 -0
  201. package/esm/DotplotView/model.js +616 -0
  202. package/esm/DotplotView/model.js.map +1 -0
  203. package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +5 -0
  204. package/esm/DotplotView/svgcomponents/SVGBackground.js +7 -0
  205. package/esm/DotplotView/svgcomponents/SVGBackground.js.map +1 -0
  206. package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +2 -0
  207. package/esm/DotplotView/svgcomponents/SVGDotplotView.js +40 -0
  208. package/esm/DotplotView/svgcomponents/SVGDotplotView.js.map +1 -0
  209. package/esm/LaunchDotplotView.d.ts +2 -0
  210. package/esm/LaunchDotplotView.js +42 -0
  211. package/esm/LaunchDotplotView.js.map +1 -0
  212. package/esm/ServerSideRenderedBlockContent.d.ts +12 -0
  213. package/esm/ServerSideRenderedBlockContent.js +62 -0
  214. package/esm/ServerSideRenderedBlockContent.js.map +1 -0
  215. package/esm/ServerSideSyntenyRendering.d.ts +23 -0
  216. package/esm/ServerSideSyntenyRendering.js +29 -0
  217. package/esm/ServerSideSyntenyRendering.js.map +1 -0
  218. package/esm/index.d.ts +7 -0
  219. package/esm/index.js +38 -0
  220. package/esm/index.js.map +1 -0
  221. package/esm/util.d.ts +9 -0
  222. package/esm/util.js +5 -0
  223. package/esm/util.js.map +1 -0
  224. package/package.json +69 -0
  225. package/src/ComparativeRenderer/index.ts +87 -0
  226. package/src/DotplotDisplay/components/DotplotDisplay.tsx +34 -0
  227. package/src/DotplotDisplay/index.ts +48 -0
  228. package/src/DotplotDisplay/renderDotplotBlock.ts +60 -0
  229. package/src/DotplotDisplay/stateModelFactory.tsx +196 -0
  230. package/src/DotplotReadVsRef/DotplotReadVsRef.ts +115 -0
  231. package/src/DotplotReadVsRef/index.ts +50 -0
  232. package/src/DotplotRenderer/ComparativeRenderRpc.ts +87 -0
  233. package/src/DotplotRenderer/DotplotRenderer.ts +328 -0
  234. package/src/DotplotRenderer/__image_snapshots__/linear-synteny-renderer-test-ts-test-rendering-a-simple-synteny-from-fake-data-1-snap.png +0 -0
  235. package/src/DotplotRenderer/components/DotplotRendering.tsx +12 -0
  236. package/src/DotplotRenderer/configSchema.ts +92 -0
  237. package/src/DotplotRenderer/index.ts +16 -0
  238. package/src/DotplotView/1dview.ts +98 -0
  239. package/src/DotplotView/blockTypes.ts +140 -0
  240. package/src/DotplotView/components/Axes.tsx +246 -0
  241. package/src/DotplotView/components/CursorIcon.tsx +24 -0
  242. package/src/DotplotView/components/DotplotTooltip.tsx +163 -0
  243. package/src/DotplotView/components/DotplotView.tsx +348 -0
  244. package/src/DotplotView/components/DotplotWarnings.tsx +26 -0
  245. package/src/DotplotView/components/ExportSvgDialog.tsx +129 -0
  246. package/src/DotplotView/components/Grid.tsx +112 -0
  247. package/src/DotplotView/components/Header.tsx +182 -0
  248. package/src/DotplotView/components/ImportCustomTrack.tsx +262 -0
  249. package/src/DotplotView/components/ImportForm.tsx +209 -0
  250. package/src/DotplotView/components/ImportSyntenyTrackSelector.tsx +90 -0
  251. package/src/DotplotView/components/PanButtons.tsx +93 -0
  252. package/src/DotplotView/components/WarningDialog.tsx +74 -0
  253. package/src/DotplotView/components/util.ts +118 -0
  254. package/src/DotplotView/index.ts +16 -0
  255. package/src/DotplotView/model.test.ts +17 -0
  256. package/src/DotplotView/model.ts +719 -0
  257. package/src/DotplotView/svgcomponents/SVGBackground.tsx +21 -0
  258. package/src/DotplotView/svgcomponents/SVGDotplotView.tsx +68 -0
  259. package/src/LaunchDotplotView.ts +63 -0
  260. package/src/ServerSideRenderedBlockContent.tsx +86 -0
  261. package/src/ServerSideSyntenyRendering.tsx +54 -0
  262. package/src/index.ts +41 -0
  263. package/src/util.ts +14 -0
@@ -0,0 +1,121 @@
1
+ import React from 'react';
2
+ import { makeStyles } from 'tss-react/mui';
3
+ import { observer } from 'mobx-react';
4
+ import { getSnapshot } from 'mobx-state-tree';
5
+ import { getTickDisplayStr } from '@jbrowse/core/util';
6
+ import { bpToPx } from '@jbrowse/core/util/Base1DUtils';
7
+ import { useTheme } from '@mui/material';
8
+ // locals
9
+ import { getBlockLabelKeysToHide } from './util';
10
+ const useStyles = makeStyles()(() => ({
11
+ vtext: {
12
+ gridColumn: '1/2',
13
+ gridRow: '1/2',
14
+ pointerEvents: 'none',
15
+ userSelect: 'none',
16
+ },
17
+ htext: {
18
+ gridColumn: '2/2',
19
+ gridRow: '2/2',
20
+ pointerEvents: 'none',
21
+ userSelect: 'none',
22
+ },
23
+ }));
24
+ export const HorizontalAxis = observer(function ({ model, }) {
25
+ const { viewWidth, borderY } = model;
26
+ const { classes } = useStyles();
27
+ return (React.createElement("svg", { width: viewWidth, height: borderY, className: classes.htext },
28
+ React.createElement(HorizontalAxisRaw, { model: model })));
29
+ });
30
+ export const HorizontalAxisRaw = observer(function ({ model, }) {
31
+ const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model;
32
+ const { offsetPx, width, dynamicBlocks, bpPerPx } = hview;
33
+ const dblocks = dynamicBlocks.contentBlocks;
34
+ const hide = getBlockLabelKeysToHide(dblocks, viewWidth, offsetPx);
35
+ const theme = useTheme();
36
+ const hviewSnap = {
37
+ ...getSnapshot(hview),
38
+ width,
39
+ staticBlocks: hview.staticBlocks,
40
+ };
41
+ return (React.createElement(React.Fragment, null,
42
+ dblocks
43
+ .filter(region => !hide.has(region.key))
44
+ .map(region => {
45
+ const x = region.offsetPx;
46
+ const y = 0;
47
+ const xoff = Math.floor(x - hview.offsetPx);
48
+ return (React.createElement("text", { transform: `rotate(${htextRotation},${xoff},${y})`, key: JSON.stringify(region), x: xoff, y: y + 1, fill: theme.palette.text.primary, fontSize: 11, dominantBaseline: "hanging", textAnchor: "end" }, region.refName));
49
+ }),
50
+ hticks.map(tick => {
51
+ var _a;
52
+ const x = (((_a = bpToPx({
53
+ refName: tick.refName,
54
+ coord: tick.base,
55
+ self: hviewSnap,
56
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
57
+ return (React.createElement("line", { key: `line-${JSON.stringify(tick)}`, x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: theme.palette.divider }));
58
+ }),
59
+ hticks
60
+ .filter(tick => tick.type === 'major')
61
+ .map(tick => {
62
+ var _a;
63
+ const x = (((_a = bpToPx({
64
+ refName: tick.refName,
65
+ coord: tick.base,
66
+ self: hviewSnap,
67
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
68
+ const y = 0;
69
+ return x > 10 ? (React.createElement("text", { x: x - 7, y: y, transform: `rotate(${htextRotation},${x},${y})`, key: `text-${JSON.stringify(tick)}`, fill: theme.palette.text.primary, fontSize: 11, dominantBaseline: "middle", textAnchor: "end" }, getTickDisplayStr(tick.base + 1, bpPerPx))) : null;
70
+ }),
71
+ React.createElement("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, fill: theme.palette.text.primary, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging" }, hview.assemblyNames.join(','))));
72
+ });
73
+ export const VerticalAxis = observer(function ({ model, }) {
74
+ const { borderX, viewHeight } = model;
75
+ const { classes } = useStyles();
76
+ return (React.createElement("svg", { className: classes.vtext, width: borderX, height: viewHeight },
77
+ React.createElement(VerticalAxisRaw, { model: model })));
78
+ });
79
+ export const VerticalAxisRaw = observer(function ({ model, }) {
80
+ const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model;
81
+ const { offsetPx, width, dynamicBlocks, bpPerPx } = vview;
82
+ const dblocks = dynamicBlocks.contentBlocks;
83
+ const hide = getBlockLabelKeysToHide(dblocks, viewHeight, offsetPx);
84
+ const theme = useTheme();
85
+ const vviewSnap = {
86
+ ...getSnapshot(vview),
87
+ width,
88
+ staticBlocks: vview.staticBlocks,
89
+ };
90
+ return (React.createElement(React.Fragment, null,
91
+ dblocks
92
+ .filter(region => !hide.has(region.key))
93
+ .map(region => {
94
+ const y = region.offsetPx;
95
+ const x = borderX;
96
+ const yoff = Math.floor(viewHeight - y + offsetPx);
97
+ return (React.createElement("text", { transform: `rotate(${vtextRotation},${x},${y})`, key: JSON.stringify(region), x: x, y: yoff, fill: theme.palette.text.primary, fontSize: 11, textAnchor: "end" }, region.refName));
98
+ }),
99
+ vticks.map(tick => {
100
+ var _a;
101
+ const y = (((_a = bpToPx({
102
+ refName: tick.refName,
103
+ coord: tick.base,
104
+ self: vviewSnap,
105
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
106
+ return (React.createElement("line", { key: `line-${JSON.stringify(tick)}`, y1: viewHeight - y, y2: viewHeight - y, x1: borderX, x2: borderX - (tick.type === 'major' ? 6 : 4), strokeWidth: 1, stroke: theme.palette.divider }));
107
+ }),
108
+ vticks
109
+ .filter(tick => tick.type === 'major')
110
+ .map(tick => {
111
+ var _a;
112
+ const y = (((_a = bpToPx({
113
+ refName: tick.refName,
114
+ coord: tick.base,
115
+ self: vviewSnap,
116
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
117
+ return y > 10 ? (React.createElement("text", { y: viewHeight - y - 3, x: borderX - 7, key: `text-${JSON.stringify(tick)}`, textAnchor: "end", fill: theme.palette.text.primary, dominantBaseline: "hanging", fontSize: 11 }, getTickDisplayStr(tick.base + 1, bpPerPx))) : null;
118
+ }),
119
+ React.createElement("text", { y: (viewHeight - borderY) / 2, x: 12, fill: theme.palette.text.primary, transform: `rotate(-90,12,${(viewHeight - borderY) / 2})`, textAnchor: "middle", fontSize: 11 }, vview.assemblyNames.join(','))));
120
+ });
121
+ //# sourceMappingURL=Axes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Axes.js","sourceRoot":"","sources":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ACJ,8BACE,CAAC,EAAE,CAAC,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,EAC7B,CAAC,EAAE,EAAE,EACL,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAChC,SAAS,EAAE,iBAAiB,CAAC,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,EACzD,UAAU,EAAC,QAAQ,EACnB,QAAQ,EAAE,EAAE,IAEX,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CACzB,CACN,CACJ,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ import React from 'react';
3
+ export declare function CursorMove(props: SvgIconProps): React.JSX.Element;
4
+ export declare function CursorMouse(props: SvgIconProps): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import SvgIcon from '@mui/material/SvgIcon';
2
+ import React from 'react';
3
+ export function CursorMove(props) {
4
+ return (React.createElement(SvgIcon, { ...props },
5
+ React.createElement("path", { fill: "currentColor", d: "M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z" })));
6
+ }
7
+ export function CursorMouse(props) {
8
+ return (React.createElement(SvgIcon, { ...props },
9
+ React.createElement("path", { fill: "currentColor", d: "M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z" })));
10
+ }
11
+ //# sourceMappingURL=CursorIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorIcon.js","sourceRoot":"","sources":["../../../src/DotplotView/components/CursorIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAyB,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,UAAU,UAAU,CAAC,KAAmB;IAC5C,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK;QAChB,8BACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,kIAAkI,GACpI,CACM,CACX,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAmB;IAC7C,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK;QAChB,8BACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,yeAAye,GAC3e,CACM,CACX,CAAA;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { DotplotViewModel } from '../model';
3
+ export declare function round(value: number): number;
4
+ type Coord = [number, number] | undefined;
5
+ export declare const TooltipWhereMouseovered: ({ model, mouserect, mouserectClient, xdistance, ydistance, }: {
6
+ model: DotplotViewModel;
7
+ mouserect: Coord;
8
+ mouserectClient: Coord;
9
+ xdistance: number;
10
+ ydistance: number;
11
+ }) => React.JSX.Element;
12
+ export declare const TooltipWhereClicked: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
13
+ model: DotplotViewModel;
14
+ mousedown: Coord;
15
+ mousedownClient: Coord;
16
+ xdistance: number;
17
+ ydistance: number;
18
+ }) => React.JSX.Element;
19
+ export {};
@@ -0,0 +1,101 @@
1
+ import React, { useMemo, useRef, useState } from 'react';
2
+ import { observer } from 'mobx-react';
3
+ import { makeStyles } from 'tss-react/mui';
4
+ import { locstr } from './util';
5
+ import { Portal, alpha } from '@mui/material';
6
+ import { usePopper } from 'react-popper';
7
+ export function round(value) {
8
+ return Math.round(value * 1e5) / 1e5;
9
+ }
10
+ const useStyles = makeStyles()(theme => ({
11
+ // these styles come from
12
+ // https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
13
+ tooltip: {
14
+ position: 'absolute',
15
+ pointerEvents: 'none',
16
+ backgroundColor: alpha(theme.palette.grey[700], 0.9),
17
+ borderRadius: theme.shape.borderRadius,
18
+ color: theme.palette.common.white,
19
+ fontFamily: theme.typography.fontFamily,
20
+ padding: '4px 8px',
21
+ fontSize: theme.typography.pxToRem(12),
22
+ lineHeight: `${round(14 / 10)}em`,
23
+ maxWidth: 300,
24
+ wordWrap: 'break-word',
25
+ },
26
+ }));
27
+ const blank = { left: 0, top: 0, width: 0, height: 0 };
28
+ export const TooltipWhereMouseovered = observer(function ({ model, mouserect, mouserectClient, xdistance, ydistance, }) {
29
+ var _a;
30
+ const { classes } = useStyles();
31
+ const { hview, vview, viewHeight } = model;
32
+ const [anchorEl, setAnchorEl] = useState(null);
33
+ const ref = useRef(null);
34
+ const rect = ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || blank;
35
+ const offset = 6;
36
+ const w = rect.height + offset * 2;
37
+ // must be memoized a la https://github.com/popperjs/react-popper/issues/391
38
+ const virtElement = useMemo(() => ({
39
+ getBoundingClientRect: () => {
40
+ const x = offset + ((mouserectClient === null || mouserectClient === void 0 ? void 0 : mouserectClient[0]) || 0) - (xdistance < 0 ? w : 0);
41
+ const y = offset + ((mouserectClient === null || mouserectClient === void 0 ? void 0 : mouserectClient[1]) || 0) - (ydistance < 0 ? w : 0);
42
+ return {
43
+ top: y,
44
+ left: x,
45
+ bottom: y,
46
+ right: x,
47
+ width: 0,
48
+ height: 0,
49
+ x,
50
+ y,
51
+ toJSON() { },
52
+ };
53
+ },
54
+ }), [mouserectClient, xdistance, ydistance, w]);
55
+ const { styles, attributes } = usePopper(virtElement, anchorEl, {
56
+ placement: xdistance < 0 ? 'left' : 'right',
57
+ });
58
+ return (React.createElement(React.Fragment, null, mouserect ? (React.createElement(Portal, null,
59
+ React.createElement("div", { ref: setAnchorEl, className: classes.tooltip,
60
+ // zIndex needed to go over widget drawer
61
+ style: { ...styles.popper, zIndex: 100000 }, ...attributes.popper },
62
+ `x - ${locstr(mouserect[0], hview)}`,
63
+ React.createElement("br", null),
64
+ `y - ${locstr(viewHeight - mouserect[1], vview)}`,
65
+ React.createElement("br", null)))) : null));
66
+ });
67
+ export const TooltipWhereClicked = observer(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
68
+ const { classes } = useStyles();
69
+ const { hview, vview, viewHeight } = model;
70
+ const [anchorEl, setAnchorEl] = useState(null);
71
+ // must be memoized a la https://github.com/popperjs/react-popper/issues/391
72
+ const virtElement = useMemo(() => ({
73
+ getBoundingClientRect: () => {
74
+ const x = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[0]) || 0) - (xdistance < 0 ? 0 : 0);
75
+ const y = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[1]) || 0) - (ydistance < 0 ? 0 : 0);
76
+ return {
77
+ top: y,
78
+ left: x,
79
+ bottom: y,
80
+ right: x,
81
+ width: 0,
82
+ height: 0,
83
+ x,
84
+ y,
85
+ toJSON() { },
86
+ };
87
+ },
88
+ }), [mousedownClient, xdistance, ydistance]);
89
+ const { styles, attributes } = usePopper(virtElement, anchorEl, {
90
+ placement: xdistance < 0 ? 'right' : 'left',
91
+ });
92
+ return (React.createElement(React.Fragment, null, mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (React.createElement(Portal, null,
93
+ React.createElement("div", { ref: setAnchorEl, className: classes.tooltip,
94
+ // zIndex needed to go over widget drawer
95
+ style: { ...styles.popper, zIndex: 100000 }, ...attributes.popper },
96
+ `x - ${locstr(mousedown[0], hview)}`,
97
+ React.createElement("br", null),
98
+ `y - ${locstr(viewHeight - mousedown[1], vview)}`,
99
+ React.createElement("br", null)))) : null));
100
+ });
101
+ //# sourceMappingURL=DotplotTooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DotplotTooltip.js","sourceRoot":"","sources":["../../../src/DotplotView/components/DotplotTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;AACtC,CAAC;AACD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,yBAAyB;IACzB,iGAAiG;IACjG,OAAO,EAAE;QACP,QAAQ,EAAE,UAAU;QACpB,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;QACpD,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY;QACtC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QACjC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU;QACvC,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,UAAU,EAAE,GAAG,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI;QACjC,QAAQ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,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACjE,oBAAC,MAAM;QACL,6BACE,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,OAAO,CAAC,OAAO;YAC1B,yCAAyC;YACzC,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KACvC,UAAU,CAAC,MAAM;YAEpB,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;YACrC,+BAAM;YACL,OAAO,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;YAClD,+BAAM,CACF,CACC,CACV,CAAC,CAAC,CAAC,IAAI,CACP,CACJ,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DotplotViewModel } from '../model';
3
+ declare const DotplotView: ({ model }: {
4
+ model: DotplotViewModel;
5
+ }) => React.JSX.Element;
6
+ export default DotplotView;
@@ -0,0 +1,244 @@
1
+ import React, { useState, useEffect, useRef } from 'react';
2
+ import { LoadingEllipses, Menu, ResizeHandle } from '@jbrowse/core/ui';
3
+ import { observer } from 'mobx-react';
4
+ import { transaction } from 'mobx';
5
+ import { makeStyles } from 'tss-react/mui';
6
+ import normalizeWheel from 'normalize-wheel';
7
+ import ImportForm from './ImportForm';
8
+ import Header from './Header';
9
+ import Grid from './Grid';
10
+ import { HorizontalAxis, VerticalAxis } from './Axes';
11
+ import { TooltipWhereClicked, TooltipWhereMouseovered } from './DotplotTooltip';
12
+ const blank = { left: 0, top: 0, width: 0, height: 0 };
13
+ const useStyles = makeStyles()(theme => ({
14
+ spacer: {
15
+ gridColumn: '1/2',
16
+ gridRow: '2/2',
17
+ },
18
+ root: {
19
+ position: 'relative',
20
+ marginBottom: theme.spacing(1),
21
+ overflow: 'hidden',
22
+ },
23
+ container: {
24
+ display: 'grid',
25
+ padding: 5,
26
+ position: 'relative',
27
+ },
28
+ overlay: {
29
+ pointerEvents: 'none',
30
+ overflow: 'hidden',
31
+ display: 'flex',
32
+ width: '100%',
33
+ gridRow: '1/2',
34
+ gridColumn: '2/2',
35
+ zIndex: 100,
36
+ '& path': {
37
+ cursor: 'crosshair',
38
+ fill: 'none',
39
+ },
40
+ },
41
+ content: {
42
+ position: 'relative',
43
+ gridColumn: '2/2',
44
+ gridRow: '1/2',
45
+ },
46
+ resizeHandle: {
47
+ height: 4,
48
+ background: '#ccc',
49
+ boxSizing: 'border-box',
50
+ borderTop: '1px solid #fafafa',
51
+ },
52
+ }));
53
+ // produces offsetX/offsetY coordinates from a clientX and an element's
54
+ // getBoundingClientRect
55
+ function getOffset(coord, rect) {
56
+ return coord && [coord[0] - rect.left, coord[1] - rect.top];
57
+ }
58
+ const RenderedComponent = observer(({ model }) => {
59
+ const { classes } = useStyles();
60
+ return (React.createElement("div", { className: classes.overlay }, model.tracks.map(track => {
61
+ const [display] = track.displays;
62
+ const { RenderingComponent } = display;
63
+ return RenderingComponent ? (React.createElement(RenderingComponent, { key: track.configuration.trackId, model: display })) : null;
64
+ })));
65
+ });
66
+ const DotplotViewInternal = observer(function ({ model, }) {
67
+ var _a, _b;
68
+ const { classes } = useStyles();
69
+ const [mousecurrClient, setMouseCurrClient] = useState();
70
+ const [mousedownClient, setMouseDownClient] = useState();
71
+ const [mouseOvered, setMouseOvered] = useState(false);
72
+ const [mouseupClient, setMouseUpClient] = useState();
73
+ const ref = useRef(null);
74
+ const root = useRef(null);
75
+ const distanceX = useRef(0);
76
+ const distanceY = useRef(0);
77
+ const scheduled = useRef(false);
78
+ const [ctrlKeyWasUsed, setCtrlKeyWasUsed] = useState(false);
79
+ const svg = ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || blank;
80
+ const rootRect = ((_b = ref.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) || blank;
81
+ const mousedown = getOffset(mousedownClient, svg);
82
+ const mousecurr = getOffset(mousecurrClient, svg);
83
+ const mouseup = getOffset(mouseupClient, svg);
84
+ const mouserectClient = mouseupClient || mousecurrClient;
85
+ const mouserect = mouseup || mousecurr;
86
+ const xdistance = mousedown && mouserect ? mouserect[0] - mousedown[0] : 0;
87
+ const ydistance = mousedown && mouserect ? mouserect[1] - mousedown[1] : 0;
88
+ const { hview, vview, wheelMode, cursorMode } = model;
89
+ const validPan = (cursorMode === 'move' && !ctrlKeyWasUsed) ||
90
+ (cursorMode === 'crosshair' && ctrlKeyWasUsed);
91
+ const validSelect = (cursorMode === 'move' && ctrlKeyWasUsed) ||
92
+ (cursorMode === 'crosshair' && !ctrlKeyWasUsed);
93
+ // use non-React wheel handler to properly prevent body scrolling
94
+ useEffect(() => {
95
+ function onWheel(origEvent) {
96
+ const event = normalizeWheel(origEvent);
97
+ origEvent.preventDefault();
98
+ distanceX.current += event.pixelX;
99
+ distanceY.current -= event.pixelY;
100
+ if (!scheduled.current) {
101
+ scheduled.current = true;
102
+ window.requestAnimationFrame(() => {
103
+ transaction(() => {
104
+ if (wheelMode === 'pan') {
105
+ hview.scroll(distanceX.current / 3);
106
+ vview.scroll(distanceY.current / 10);
107
+ }
108
+ else if (wheelMode === 'zoom') {
109
+ if (Math.abs(distanceY.current) > Math.abs(distanceX.current) * 2 &&
110
+ mousecurr) {
111
+ const val = distanceY.current < 0 ? 1.1 : 0.9;
112
+ hview.zoomTo(hview.bpPerPx * val, mousecurr[0]);
113
+ vview.zoomTo(vview.bpPerPx * val, rootRect.height - mousecurr[1]);
114
+ }
115
+ }
116
+ });
117
+ scheduled.current = false;
118
+ distanceX.current = 0;
119
+ distanceY.current = 0;
120
+ });
121
+ }
122
+ }
123
+ if (ref.current) {
124
+ const curr = ref.current;
125
+ curr.addEventListener('wheel', onWheel);
126
+ return () => curr.removeEventListener('wheel', onWheel);
127
+ }
128
+ return () => { };
129
+ }, [hview, vview, wheelMode, mousecurr, rootRect.height]);
130
+ useEffect(() => {
131
+ function globalMouseMove(event) {
132
+ setMouseCurrClient([event.clientX, event.clientY]);
133
+ if (mousecurrClient && mousedownClient && validPan && !mouseupClient) {
134
+ hview.scroll(-event.clientX + mousecurrClient[0]);
135
+ vview.scroll(event.clientY - mousecurrClient[1]);
136
+ }
137
+ }
138
+ window.addEventListener('mousemove', globalMouseMove);
139
+ return () => window.removeEventListener('mousemove', globalMouseMove);
140
+ }, [
141
+ validPan,
142
+ mousecurrClient,
143
+ mousedownClient,
144
+ cursorMode,
145
+ ctrlKeyWasUsed,
146
+ mouseupClient,
147
+ hview,
148
+ vview,
149
+ ]);
150
+ // detect a mouseup after a mousedown was submitted, autoremoves mouseup
151
+ // once that single mouseup is set
152
+ useEffect(() => {
153
+ function globalMouseUp(event) {
154
+ if (Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 && validSelect) {
155
+ setMouseUpClient([event.clientX, event.clientY]);
156
+ }
157
+ else {
158
+ setMouseDownClient(undefined);
159
+ }
160
+ }
161
+ if (mousedown && !mouseup) {
162
+ window.addEventListener('mouseup', globalMouseUp, true);
163
+ return () => window.removeEventListener('mouseup', globalMouseUp, true);
164
+ }
165
+ return () => { };
166
+ }, [
167
+ validSelect,
168
+ mousedown,
169
+ mousecurr,
170
+ mouseup,
171
+ xdistance,
172
+ ydistance,
173
+ ctrlKeyWasUsed,
174
+ cursorMode,
175
+ ]);
176
+ return (React.createElement("div", null,
177
+ React.createElement(Header, { model: model, selection: !validSelect || !(mousedown && mouserect)
178
+ ? undefined
179
+ : {
180
+ width: Math.abs(xdistance),
181
+ height: Math.abs(ydistance),
182
+ } }),
183
+ React.createElement("div", { ref: root, className: classes.root, onMouseLeave: () => setMouseOvered(false), onMouseEnter: () => setMouseOvered(true) },
184
+ React.createElement("div", { className: classes.container },
185
+ React.createElement(VerticalAxis, { model: model }),
186
+ React.createElement(HorizontalAxis, { model: model }),
187
+ React.createElement("div", { ref: ref, className: classes.content },
188
+ mouseOvered && validSelect ? (React.createElement(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance, ydistance: ydistance })) : null,
189
+ validSelect ? (React.createElement(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance })) : null,
190
+ React.createElement("div", { style: { cursor: ctrlKeyWasUsed ? 'pointer' : cursorMode }, onMouseDown: event => {
191
+ if (event.button === 0) {
192
+ const { clientX, clientY } = event;
193
+ setMouseDownClient([clientX, clientY]);
194
+ setMouseCurrClient([clientX, clientY]);
195
+ setCtrlKeyWasUsed(event.ctrlKey);
196
+ }
197
+ } },
198
+ React.createElement(Grid, { model: model }, validSelect && mousedown && mouserect ? (React.createElement("rect", { fill: "rgba(255,0,0,0.3)", x: Math.min(mouserect[0], mousedown[0]), y: Math.min(mouserect[1], mousedown[1]), width: Math.abs(xdistance), height: Math.abs(ydistance) })) : null)),
199
+ React.createElement("div", { className: classes.spacer })),
200
+ React.createElement(RenderedComponent, { model: model }),
201
+ React.createElement(Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
202
+ callback();
203
+ setMouseUpClient(undefined);
204
+ setMouseDownClient(undefined);
205
+ }, onClose: () => {
206
+ setMouseUpClient(undefined);
207
+ setMouseDownClient(undefined);
208
+ }, anchorReference: "anchorPosition", anchorPosition: mouseupClient
209
+ ? {
210
+ top: mouseupClient[1] + 50,
211
+ left: mouseupClient[0] + 50,
212
+ }
213
+ : undefined, style: { zIndex: 10000 }, menuItems: [
214
+ {
215
+ label: 'Zoom in',
216
+ onClick: () => {
217
+ if (mousedown && mouseup) {
218
+ model.zoomIn(mousedown, mouseup);
219
+ }
220
+ },
221
+ },
222
+ {
223
+ label: 'Open linear synteny view',
224
+ onClick: () => {
225
+ if (mousedown && mouseup) {
226
+ model.onDotplotView(mousedown, mouseup);
227
+ }
228
+ },
229
+ },
230
+ ] })),
231
+ React.createElement(ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle }))));
232
+ });
233
+ const DotplotView = observer(({ model }) => {
234
+ const { initialized, loading, error } = model;
235
+ if ((!initialized && !loading) || error) {
236
+ return React.createElement(ImportForm, { model: model });
237
+ }
238
+ if (loading) {
239
+ return React.createElement(LoadingEllipses, { variant: "h6" });
240
+ }
241
+ return React.createElement(DotplotViewInternal, { model: model });
242
+ });
243
+ export default DotplotView;
244
+ //# sourceMappingURL=DotplotView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DotplotView.js","sourceRoot":"","sources":["../../../src/DotplotView/components/DotplotView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,cAAc,MAAM,iBAAiB,CAAA;AAI5C,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,IAAI,MAAM,QAAQ,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE/E,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAA;AAEtD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,MAAM,EAAE;QACN,UAAU,EAAE,KAAK;QACjB,OAAO,EA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X,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAC9C,SAAS,EAAE,OAAO,CAAC,YAAY,GAC/B,CACE,CACF,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AACF,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,EAAE,KAAK,EAA+B,EAAE,EAAE;IACtE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;IAE7C,IAAI,CAAC,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,EAAE;QACvC,OAAO,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI,CAAA;KACpC;IAED,IAAI,OAAO,EAAE;QACX,OAAO,oBAAC,eAAe,IAAC,OAAO,EAAC,IAAI,GAAG,CAAA;KACxC;IAED,OAAO,oBAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,GAAI,CAAA;AAC9C,CAAC,CAAC,CAAA;AAEF,eAAe,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DotplotViewModel } from '../model';
3
+ declare const _default: ({ model }: {
4
+ model: DotplotViewModel;
5
+ }) => React.JSX.Element | null;
6
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import React, { lazy, useState } from 'react';
2
+ import { Alert, Button } from '@mui/material';
3
+ import { observer } from 'mobx-react';
4
+ // lazy components
5
+ const WarningDialog = lazy(() => import('./WarningDialog'));
6
+ export default observer(function ({ model }) {
7
+ const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
8
+ const [shown, setShown] = useState(false);
9
+ return trackWarnings.length ? (React.createElement(Alert, { severity: "warning" },
10
+ "Warnings during render",
11
+ ' ',
12
+ React.createElement(Button, { onClick: () => setShown(true) }, "More info"),
13
+ shown ? (React.createElement(WarningDialog, { trackWarnings: trackWarnings, handleClose: () => setShown(false) })) : null)) : null;
14
+ });
15
+ //# sourceMappingURL=DotplotWarnings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DotplotWarnings.js","sourceRoot":"","sources":["../../../src/DotplotView/components/DotplotWarnings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAKrC,kBAAkB;AAClB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAE3D,eAAe,QAAQ,CAAC,UAAU,EAAE,KAAK,EAA+B;IACtE,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,0CAAE,MAAM,CAAA,EAAA,CAAC,CAAA;IAC9E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACzC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAC5B,oBAAC,KAAK,IAAC,QAAQ,EAAC,SAAS;;QACA,GAAG;QAC1B,oBAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAoB;QACxD,KAAK,CAAC,CAAC,CAAC,CACP,oBAAC,aAAa,IACZ,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAClC,CACH,CAAC,CAAC,CAAC,IAAI,CACF,CACT,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ExportSvgOptions } from '../model';
3
+ export default function ExportSvgDlg({ model, handleClose, }: {
4
+ model: {
5
+ exportSvg(opts: ExportSvgOptions): Promise<void>;
6
+ };
7
+ handleClose: () => void;
8
+ }): React.JSX.Element;