@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,127 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.VerticalAxisRaw = exports.VerticalAxis = exports.HorizontalAxisRaw = exports.HorizontalAxis = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const mui_1 = require("tss-react/mui");
9
+ const mobx_react_1 = require("mobx-react");
10
+ const mobx_state_tree_1 = require("mobx-state-tree");
11
+ const util_1 = require("@jbrowse/core/util");
12
+ const Base1DUtils_1 = require("@jbrowse/core/util/Base1DUtils");
13
+ const material_1 = require("@mui/material");
14
+ // locals
15
+ const util_2 = require("./util");
16
+ const useStyles = (0, mui_1.makeStyles)()(() => ({
17
+ vtext: {
18
+ gridColumn: '1/2',
19
+ gridRow: '1/2',
20
+ pointerEvents: 'none',
21
+ userSelect: 'none',
22
+ },
23
+ htext: {
24
+ gridColumn: '2/2',
25
+ gridRow: '2/2',
26
+ pointerEvents: 'none',
27
+ userSelect: 'none',
28
+ },
29
+ }));
30
+ exports.HorizontalAxis = (0, mobx_react_1.observer)(function ({ model, }) {
31
+ const { viewWidth, borderY } = model;
32
+ const { classes } = useStyles();
33
+ return (react_1.default.createElement("svg", { width: viewWidth, height: borderY, className: classes.htext },
34
+ react_1.default.createElement(exports.HorizontalAxisRaw, { model: model })));
35
+ });
36
+ exports.HorizontalAxisRaw = (0, mobx_react_1.observer)(function ({ model, }) {
37
+ const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model;
38
+ const { offsetPx, width, dynamicBlocks, bpPerPx } = hview;
39
+ const dblocks = dynamicBlocks.contentBlocks;
40
+ const hide = (0, util_2.getBlockLabelKeysToHide)(dblocks, viewWidth, offsetPx);
41
+ const theme = (0, material_1.useTheme)();
42
+ const hviewSnap = {
43
+ ...(0, mobx_state_tree_1.getSnapshot)(hview),
44
+ width,
45
+ staticBlocks: hview.staticBlocks,
46
+ };
47
+ return (react_1.default.createElement(react_1.default.Fragment, null,
48
+ dblocks
49
+ .filter(region => !hide.has(region.key))
50
+ .map(region => {
51
+ const x = region.offsetPx;
52
+ const y = 0;
53
+ const xoff = Math.floor(x - hview.offsetPx);
54
+ return (react_1.default.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));
55
+ }),
56
+ hticks.map(tick => {
57
+ var _a;
58
+ const x = (((_a = (0, Base1DUtils_1.bpToPx)({
59
+ refName: tick.refName,
60
+ coord: tick.base,
61
+ self: hviewSnap,
62
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
63
+ return (react_1.default.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 }));
64
+ }),
65
+ hticks
66
+ .filter(tick => tick.type === 'major')
67
+ .map(tick => {
68
+ var _a;
69
+ const x = (((_a = (0, Base1DUtils_1.bpToPx)({
70
+ refName: tick.refName,
71
+ coord: tick.base,
72
+ self: hviewSnap,
73
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
74
+ const y = 0;
75
+ return x > 10 ? (react_1.default.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" }, (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx))) : null;
76
+ }),
77
+ react_1.default.createElement("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, fill: theme.palette.text.primary, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging" }, hview.assemblyNames.join(','))));
78
+ });
79
+ exports.VerticalAxis = (0, mobx_react_1.observer)(function ({ model, }) {
80
+ const { borderX, viewHeight } = model;
81
+ const { classes } = useStyles();
82
+ return (react_1.default.createElement("svg", { className: classes.vtext, width: borderX, height: viewHeight },
83
+ react_1.default.createElement(exports.VerticalAxisRaw, { model: model })));
84
+ });
85
+ exports.VerticalAxisRaw = (0, mobx_react_1.observer)(function ({ model, }) {
86
+ const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model;
87
+ const { offsetPx, width, dynamicBlocks, bpPerPx } = vview;
88
+ const dblocks = dynamicBlocks.contentBlocks;
89
+ const hide = (0, util_2.getBlockLabelKeysToHide)(dblocks, viewHeight, offsetPx);
90
+ const theme = (0, material_1.useTheme)();
91
+ const vviewSnap = {
92
+ ...(0, mobx_state_tree_1.getSnapshot)(vview),
93
+ width,
94
+ staticBlocks: vview.staticBlocks,
95
+ };
96
+ return (react_1.default.createElement(react_1.default.Fragment, null,
97
+ dblocks
98
+ .filter(region => !hide.has(region.key))
99
+ .map(region => {
100
+ const y = region.offsetPx;
101
+ const x = borderX;
102
+ const yoff = Math.floor(viewHeight - y + offsetPx);
103
+ return (react_1.default.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));
104
+ }),
105
+ vticks.map(tick => {
106
+ var _a;
107
+ const y = (((_a = (0, Base1DUtils_1.bpToPx)({
108
+ refName: tick.refName,
109
+ coord: tick.base,
110
+ self: vviewSnap,
111
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
112
+ return (react_1.default.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 }));
113
+ }),
114
+ vticks
115
+ .filter(tick => tick.type === 'major')
116
+ .map(tick => {
117
+ var _a;
118
+ const y = (((_a = (0, Base1DUtils_1.bpToPx)({
119
+ refName: tick.refName,
120
+ coord: tick.base,
121
+ self: vviewSnap,
122
+ })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - offsetPx;
123
+ return y > 10 ? (react_1.default.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 }, (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx))) : null;
124
+ }),
125
+ react_1.default.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(','))));
126
+ });
127
+ //# sourceMappingURL=Axes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Axes.js","sourceRoot":"","sources":["../../../src/DotplotView/components/Axes.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,uCAA0C;AAC1C,2CAAqC;AACrC,qDAA6C;AAC7C,6CAAsD;AACtD,gEAAuD;AACvD,4CAAwC;AAExC,SAAS;AACT,iCAAgD;AAGhD,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IACpC,KAAK,EAAE;QACL,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,MAAM;QACrB,UAAU,EAAE,MAAM;KACnB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,MAAM;QACrB,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAC,CAAA;AAEU,QAAA,cAAc,GAAG,IAAA,qBAAQ,EAAC,UAAU,EAC/C,KAAK,GAGN;IACC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;IACpC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;IAC/B,OAAO,CACL,uC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AAE,QAAQ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EACnC,UAAU,EAAC,KAAK,EAChB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAChC,gBAAgB,EAAC,SAAS,EAC1B,QAAQ,EAAE,EAAE,IAEX,IAAA,wBAAiB,EAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,OAAO,CAAC,CACrC,CACR,CAAC,CAAC,CAAC,IAAI,CAAA;QACV,CAAC,CAAC;QACJ,wCACE,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,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CursorMouse = exports.CursorMove = void 0;
7
+ const SvgIcon_1 = __importDefault(require("@mui/material/SvgIcon"));
8
+ const react_1 = __importDefault(require("react"));
9
+ function CursorMove(props) {
10
+ return (react_1.default.createElement(SvgIcon_1.default, { ...props },
11
+ react_1.default.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" })));
12
+ }
13
+ exports.CursorMove = CursorMove;
14
+ function CursorMouse(props) {
15
+ return (react_1.default.createElement(SvgIcon_1.default, { ...props },
16
+ react_1.default.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" })));
17
+ }
18
+ exports.CursorMouse = CursorMouse;
19
+ //# sourceMappingURL=CursorIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorIcon.js","sourceRoot":"","sources":["../../../src/DotplotView/components/CursorIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,oEAA6D;AAC7D,kDAAyB;AAEzB,SAAgB,UAAU,CAAC,KAAmB;IAC5C,OAAO,CACL,8BAAC,iBAAO,OAAK,KAAK;QAChB,wCACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,kIAAkI,GACpI,CACM,CACX,CAAA;AACH,CAAC;AATD,gCASC;AAED,SAAgB,WAAW,CAAC,KAAmB;IAC7C,OAAO,CACL,8BAAC,iBAAO,OAAK,KAAK;QAChB,wCACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,yeAAye,GAC3e,CACM,CACX,CAAA;AACH,CAAC;AATD,kCASC"}
@@ -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,128 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.TooltipWhereClicked = exports.TooltipWhereMouseovered = exports.round = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const mobx_react_1 = require("mobx-react");
29
+ const mui_1 = require("tss-react/mui");
30
+ const util_1 = require("./util");
31
+ const material_1 = require("@mui/material");
32
+ const react_popper_1 = require("react-popper");
33
+ function round(value) {
34
+ return Math.round(value * 1e5) / 1e5;
35
+ }
36
+ exports.round = round;
37
+ const useStyles = (0, mui_1.makeStyles)()(theme => ({
38
+ // these styles come from
39
+ // https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
40
+ tooltip: {
41
+ position: 'absolute',
42
+ pointerEvents: 'none',
43
+ backgroundColor: (0, material_1.alpha)(theme.palette.grey[700], 0.9),
44
+ borderRadius: theme.shape.borderRadius,
45
+ color: theme.palette.common.white,
46
+ fontFamily: theme.typography.fontFamily,
47
+ padding: '4px 8px',
48
+ fontSize: theme.typography.pxToRem(12),
49
+ lineHeight: `${round(14 / 10)}em`,
50
+ maxWidth: 300,
51
+ wordWrap: 'break-word',
52
+ },
53
+ }));
54
+ const blank = { left: 0, top: 0, width: 0, height: 0 };
55
+ exports.TooltipWhereMouseovered = (0, mobx_react_1.observer)(function ({ model, mouserect, mouserectClient, xdistance, ydistance, }) {
56
+ var _a;
57
+ const { classes } = useStyles();
58
+ const { hview, vview, viewHeight } = model;
59
+ const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
60
+ const ref = (0, react_1.useRef)(null);
61
+ const rect = ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || blank;
62
+ const offset = 6;
63
+ const w = rect.height + offset * 2;
64
+ // must be memoized a la https://github.com/popperjs/react-popper/issues/391
65
+ const virtElement = (0, react_1.useMemo)(() => ({
66
+ getBoundingClientRect: () => {
67
+ const x = offset + ((mouserectClient === null || mouserectClient === void 0 ? void 0 : mouserectClient[0]) || 0) - (xdistance < 0 ? w : 0);
68
+ const y = offset + ((mouserectClient === null || mouserectClient === void 0 ? void 0 : mouserectClient[1]) || 0) - (ydistance < 0 ? w : 0);
69
+ return {
70
+ top: y,
71
+ left: x,
72
+ bottom: y,
73
+ right: x,
74
+ width: 0,
75
+ height: 0,
76
+ x,
77
+ y,
78
+ toJSON() { },
79
+ };
80
+ },
81
+ }), [mouserectClient, xdistance, ydistance, w]);
82
+ const { styles, attributes } = (0, react_popper_1.usePopper)(virtElement, anchorEl, {
83
+ placement: xdistance < 0 ? 'left' : 'right',
84
+ });
85
+ return (react_1.default.createElement(react_1.default.Fragment, null, mouserect ? (react_1.default.createElement(material_1.Portal, null,
86
+ react_1.default.createElement("div", { ref: setAnchorEl, className: classes.tooltip,
87
+ // zIndex needed to go over widget drawer
88
+ style: { ...styles.popper, zIndex: 100000 }, ...attributes.popper },
89
+ `x - ${(0, util_1.locstr)(mouserect[0], hview)}`,
90
+ react_1.default.createElement("br", null),
91
+ `y - ${(0, util_1.locstr)(viewHeight - mouserect[1], vview)}`,
92
+ react_1.default.createElement("br", null)))) : null));
93
+ });
94
+ exports.TooltipWhereClicked = (0, mobx_react_1.observer)(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
95
+ const { classes } = useStyles();
96
+ const { hview, vview, viewHeight } = model;
97
+ const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
98
+ // must be memoized a la https://github.com/popperjs/react-popper/issues/391
99
+ const virtElement = (0, react_1.useMemo)(() => ({
100
+ getBoundingClientRect: () => {
101
+ const x = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[0]) || 0) - (xdistance < 0 ? 0 : 0);
102
+ const y = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[1]) || 0) - (ydistance < 0 ? 0 : 0);
103
+ return {
104
+ top: y,
105
+ left: x,
106
+ bottom: y,
107
+ right: x,
108
+ width: 0,
109
+ height: 0,
110
+ x,
111
+ y,
112
+ toJSON() { },
113
+ };
114
+ },
115
+ }), [mousedownClient, xdistance, ydistance]);
116
+ const { styles, attributes } = (0, react_popper_1.usePopper)(virtElement, anchorEl, {
117
+ placement: xdistance < 0 ? 'right' : 'left',
118
+ });
119
+ return (react_1.default.createElement(react_1.default.Fragment, null, mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (react_1.default.createElement(material_1.Portal, null,
120
+ react_1.default.createElement("div", { ref: setAnchorEl, className: classes.tooltip,
121
+ // zIndex needed to go over widget drawer
122
+ style: { ...styles.popper, zIndex: 100000 }, ...attributes.popper },
123
+ `x - ${(0, util_1.locstr)(mousedown[0], hview)}`,
124
+ react_1.default.createElement("br", null),
125
+ `y - ${(0, util_1.locstr)(viewHeight - mousedown[1], vview)}`,
126
+ react_1.default.createElement("br", null)))) : null));
127
+ });
128
+ //# sourceMappingURL=DotplotTooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DotplotTooltip.js","sourceRoot":"","sources":["../../../src/DotplotView/components/DotplotTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwD;AACxD,2CAAqC;AACrC,uCAA0C;AAI1C,iCAA+B;AAC/B,4CAA6C;AAC7C,+CAAwC;AAExC,SAAgB,KAAK,CAAC,KAAa;IACjC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;AACtC,CAAC;AAFD,sBAEC;AACD,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,yBAAyB;IACzB,iGAAiG;IACjG,OAAO,EAAE;QACP,QAAQ,EAAE,UAAU;QACpB,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,IAAA,gBAAK,EAAC,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,OA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S,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;KAC5C,CAAC,CAAA;IACF,OAAO,CACL,8DACG,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACjE,8BAAC,iBAAM;QACL,uCACE,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,IAAA,aAAM,EAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;YACrC,yCAAM;YACL,OAAO,IAAA,aAAM,EAAC,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;YAClD,yCAAM,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,272 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const ui_1 = require("@jbrowse/core/ui");
31
+ const mobx_react_1 = require("mobx-react");
32
+ const mobx_1 = require("mobx");
33
+ const mui_1 = require("tss-react/mui");
34
+ const normalize_wheel_1 = __importDefault(require("normalize-wheel"));
35
+ const ImportForm_1 = __importDefault(require("./ImportForm"));
36
+ const Header_1 = __importDefault(require("./Header"));
37
+ const Grid_1 = __importDefault(require("./Grid"));
38
+ const Axes_1 = require("./Axes");
39
+ const DotplotTooltip_1 = require("./DotplotTooltip");
40
+ const blank = { left: 0, top: 0, width: 0, height: 0 };
41
+ const useStyles = (0, mui_1.makeStyles)()(theme => ({
42
+ spacer: {
43
+ gridColumn: '1/2',
44
+ gridRow: '2/2',
45
+ },
46
+ root: {
47
+ position: 'relative',
48
+ marginBottom: theme.spacing(1),
49
+ overflow: 'hidden',
50
+ },
51
+ container: {
52
+ display: 'grid',
53
+ padding: 5,
54
+ position: 'relative',
55
+ },
56
+ overlay: {
57
+ pointerEvents: 'none',
58
+ overflow: 'hidden',
59
+ display: 'flex',
60
+ width: '100%',
61
+ gridRow: '1/2',
62
+ gridColumn: '2/2',
63
+ zIndex: 100,
64
+ '& path': {
65
+ cursor: 'crosshair',
66
+ fill: 'none',
67
+ },
68
+ },
69
+ content: {
70
+ position: 'relative',
71
+ gridColumn: '2/2',
72
+ gridRow: '1/2',
73
+ },
74
+ resizeHandle: {
75
+ height: 4,
76
+ background: '#ccc',
77
+ boxSizing: 'border-box',
78
+ borderTop: '1px solid #fafafa',
79
+ },
80
+ }));
81
+ // produces offsetX/offsetY coordinates from a clientX and an element's
82
+ // getBoundingClientRect
83
+ function getOffset(coord, rect) {
84
+ return coord && [coord[0] - rect.left, coord[1] - rect.top];
85
+ }
86
+ const RenderedComponent = (0, mobx_react_1.observer)(({ model }) => {
87
+ const { classes } = useStyles();
88
+ return (react_1.default.createElement("div", { className: classes.overlay }, model.tracks.map(track => {
89
+ const [display] = track.displays;
90
+ const { RenderingComponent } = display;
91
+ return RenderingComponent ? (react_1.default.createElement(RenderingComponent, { key: track.configuration.trackId, model: display })) : null;
92
+ })));
93
+ });
94
+ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
95
+ var _a, _b;
96
+ const { classes } = useStyles();
97
+ const [mousecurrClient, setMouseCurrClient] = (0, react_1.useState)();
98
+ const [mousedownClient, setMouseDownClient] = (0, react_1.useState)();
99
+ const [mouseOvered, setMouseOvered] = (0, react_1.useState)(false);
100
+ const [mouseupClient, setMouseUpClient] = (0, react_1.useState)();
101
+ const ref = (0, react_1.useRef)(null);
102
+ const root = (0, react_1.useRef)(null);
103
+ const distanceX = (0, react_1.useRef)(0);
104
+ const distanceY = (0, react_1.useRef)(0);
105
+ const scheduled = (0, react_1.useRef)(false);
106
+ const [ctrlKeyWasUsed, setCtrlKeyWasUsed] = (0, react_1.useState)(false);
107
+ const svg = ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || blank;
108
+ const rootRect = ((_b = ref.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) || blank;
109
+ const mousedown = getOffset(mousedownClient, svg);
110
+ const mousecurr = getOffset(mousecurrClient, svg);
111
+ const mouseup = getOffset(mouseupClient, svg);
112
+ const mouserectClient = mouseupClient || mousecurrClient;
113
+ const mouserect = mouseup || mousecurr;
114
+ const xdistance = mousedown && mouserect ? mouserect[0] - mousedown[0] : 0;
115
+ const ydistance = mousedown && mouserect ? mouserect[1] - mousedown[1] : 0;
116
+ const { hview, vview, wheelMode, cursorMode } = model;
117
+ const validPan = (cursorMode === 'move' && !ctrlKeyWasUsed) ||
118
+ (cursorMode === 'crosshair' && ctrlKeyWasUsed);
119
+ const validSelect = (cursorMode === 'move' && ctrlKeyWasUsed) ||
120
+ (cursorMode === 'crosshair' && !ctrlKeyWasUsed);
121
+ // use non-React wheel handler to properly prevent body scrolling
122
+ (0, react_1.useEffect)(() => {
123
+ function onWheel(origEvent) {
124
+ const event = (0, normalize_wheel_1.default)(origEvent);
125
+ origEvent.preventDefault();
126
+ distanceX.current += event.pixelX;
127
+ distanceY.current -= event.pixelY;
128
+ if (!scheduled.current) {
129
+ scheduled.current = true;
130
+ window.requestAnimationFrame(() => {
131
+ (0, mobx_1.transaction)(() => {
132
+ if (wheelMode === 'pan') {
133
+ hview.scroll(distanceX.current / 3);
134
+ vview.scroll(distanceY.current / 10);
135
+ }
136
+ else if (wheelMode === 'zoom') {
137
+ if (Math.abs(distanceY.current) > Math.abs(distanceX.current) * 2 &&
138
+ mousecurr) {
139
+ const val = distanceY.current < 0 ? 1.1 : 0.9;
140
+ hview.zoomTo(hview.bpPerPx * val, mousecurr[0]);
141
+ vview.zoomTo(vview.bpPerPx * val, rootRect.height - mousecurr[1]);
142
+ }
143
+ }
144
+ });
145
+ scheduled.current = false;
146
+ distanceX.current = 0;
147
+ distanceY.current = 0;
148
+ });
149
+ }
150
+ }
151
+ if (ref.current) {
152
+ const curr = ref.current;
153
+ curr.addEventListener('wheel', onWheel);
154
+ return () => curr.removeEventListener('wheel', onWheel);
155
+ }
156
+ return () => { };
157
+ }, [hview, vview, wheelMode, mousecurr, rootRect.height]);
158
+ (0, react_1.useEffect)(() => {
159
+ function globalMouseMove(event) {
160
+ setMouseCurrClient([event.clientX, event.clientY]);
161
+ if (mousecurrClient && mousedownClient && validPan && !mouseupClient) {
162
+ hview.scroll(-event.clientX + mousecurrClient[0]);
163
+ vview.scroll(event.clientY - mousecurrClient[1]);
164
+ }
165
+ }
166
+ window.addEventListener('mousemove', globalMouseMove);
167
+ return () => window.removeEventListener('mousemove', globalMouseMove);
168
+ }, [
169
+ validPan,
170
+ mousecurrClient,
171
+ mousedownClient,
172
+ cursorMode,
173
+ ctrlKeyWasUsed,
174
+ mouseupClient,
175
+ hview,
176
+ vview,
177
+ ]);
178
+ // detect a mouseup after a mousedown was submitted, autoremoves mouseup
179
+ // once that single mouseup is set
180
+ (0, react_1.useEffect)(() => {
181
+ function globalMouseUp(event) {
182
+ if (Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 && validSelect) {
183
+ setMouseUpClient([event.clientX, event.clientY]);
184
+ }
185
+ else {
186
+ setMouseDownClient(undefined);
187
+ }
188
+ }
189
+ if (mousedown && !mouseup) {
190
+ window.addEventListener('mouseup', globalMouseUp, true);
191
+ return () => window.removeEventListener('mouseup', globalMouseUp, true);
192
+ }
193
+ return () => { };
194
+ }, [
195
+ validSelect,
196
+ mousedown,
197
+ mousecurr,
198
+ mouseup,
199
+ xdistance,
200
+ ydistance,
201
+ ctrlKeyWasUsed,
202
+ cursorMode,
203
+ ]);
204
+ return (react_1.default.createElement("div", null,
205
+ react_1.default.createElement(Header_1.default, { model: model, selection: !validSelect || !(mousedown && mouserect)
206
+ ? undefined
207
+ : {
208
+ width: Math.abs(xdistance),
209
+ height: Math.abs(ydistance),
210
+ } }),
211
+ react_1.default.createElement("div", { ref: root, className: classes.root, onMouseLeave: () => setMouseOvered(false), onMouseEnter: () => setMouseOvered(true) },
212
+ react_1.default.createElement("div", { className: classes.container },
213
+ react_1.default.createElement(Axes_1.VerticalAxis, { model: model }),
214
+ react_1.default.createElement(Axes_1.HorizontalAxis, { model: model }),
215
+ react_1.default.createElement("div", { ref: ref, className: classes.content },
216
+ mouseOvered && validSelect ? (react_1.default.createElement(DotplotTooltip_1.TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance, ydistance: ydistance })) : null,
217
+ validSelect ? (react_1.default.createElement(DotplotTooltip_1.TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance })) : null,
218
+ react_1.default.createElement("div", { style: { cursor: ctrlKeyWasUsed ? 'pointer' : cursorMode }, onMouseDown: event => {
219
+ if (event.button === 0) {
220
+ const { clientX, clientY } = event;
221
+ setMouseDownClient([clientX, clientY]);
222
+ setMouseCurrClient([clientX, clientY]);
223
+ setCtrlKeyWasUsed(event.ctrlKey);
224
+ }
225
+ } },
226
+ react_1.default.createElement(Grid_1.default, { model: model }, validSelect && mousedown && mouserect ? (react_1.default.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)),
227
+ react_1.default.createElement("div", { className: classes.spacer })),
228
+ react_1.default.createElement(RenderedComponent, { model: model }),
229
+ react_1.default.createElement(ui_1.Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
230
+ callback();
231
+ setMouseUpClient(undefined);
232
+ setMouseDownClient(undefined);
233
+ }, onClose: () => {
234
+ setMouseUpClient(undefined);
235
+ setMouseDownClient(undefined);
236
+ }, anchorReference: "anchorPosition", anchorPosition: mouseupClient
237
+ ? {
238
+ top: mouseupClient[1] + 50,
239
+ left: mouseupClient[0] + 50,
240
+ }
241
+ : undefined, style: { zIndex: 10000 }, menuItems: [
242
+ {
243
+ label: 'Zoom in',
244
+ onClick: () => {
245
+ if (mousedown && mouseup) {
246
+ model.zoomIn(mousedown, mouseup);
247
+ }
248
+ },
249
+ },
250
+ {
251
+ label: 'Open linear synteny view',
252
+ onClick: () => {
253
+ if (mousedown && mouseup) {
254
+ model.onDotplotView(mousedown, mouseup);
255
+ }
256
+ },
257
+ },
258
+ ] })),
259
+ react_1.default.createElement(ui_1.ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle }))));
260
+ });
261
+ const DotplotView = (0, mobx_react_1.observer)(({ model }) => {
262
+ const { initialized, loading, error } = model;
263
+ if ((!initialized && !loading) || error) {
264
+ return react_1.default.createElement(ImportForm_1.default, { model: model });
265
+ }
266
+ if (loading) {
267
+ return react_1.default.createElement(ui_1.LoadingEllipses, { variant: "h6" });
268
+ }
269
+ return react_1.default.createElement(DotplotViewInternal, { model: model });
270
+ });
271
+ exports.default = DotplotView;
272
+ //# sourceMappingURL=DotplotView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DotplotView.js","sourceRoot":"","sources":["../../../src/DotplotView/components/DotplotView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0D;AAC1D,yCAAsE;AACtE,2CAAqC;AACrC,+BAAkC;AAClC,uCAA0C;AAC1C,sEAA4C;AAI5C,8DAAqC;AACrC,sDAA6B;AAC7B,kDAAyB;AACzB,iCAAqD;AACrD,qDAA+E;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,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,MAAM,EAAE;QACN,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,KAAK;KACf;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,QAAQ,EAAE,QAAQ;KACnB;IAED,SAAS,EAAE;QACT,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,UAAU;KACrB;IACD,OAAO,EAAE;QACP,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,QAAQ;QA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A;AACF,MAAM,WAAW,GAAG,IAAA,qBAAQ,EAAC,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,8BAAC,oBAAU,IAAC,KAAK,EAAE,KAAK,GAAI,CAAA;KACpC;IAED,IAAI,OAAO,EAAE;QACX,OAAO,8BAAC,oBAAe,IAAC,OAAO,EAAC,IAAI,GAAG,CAAA;KACxC;IAED,OAAO,8BAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,GAAI,CAAA;AAC9C,CAAC,CAAC,CAAA;AAEF,kBAAe,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;