@jbrowse/plugin-dotplot-view 2.17.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ComparativeRenderer/index.d.ts +3 -8
- package/dist/ComparativeRenderer/index.js +3 -8
- package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/dist/DotplotDisplay/components/DotplotDisplay.js +7 -12
- package/dist/DotplotDisplay/index.d.ts +1 -7
- package/dist/DotplotDisplay/index.js +2 -12
- package/dist/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/dist/DotplotDisplay/renderDotplotBlock.js +3 -9
- package/dist/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/dist/DotplotDisplay/stateModelFactory.js +57 -100
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +13 -14
- package/dist/DotplotReadVsRef/index.d.ts +1 -1
- package/dist/DotplotReadVsRef/index.js +0 -2
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/dist/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/dist/DotplotRenderer/DotplotRenderer.js +18 -9
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
- package/dist/DotplotRenderer/configSchema.d.ts +0 -21
- package/dist/DotplotRenderer/configSchema.js +2 -27
- package/dist/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/dist/DotplotRenderer/drawDotplot.js +3 -6
- package/dist/DotplotRenderer/index.d.ts +1 -1
- package/dist/DotplotRenderer/index.js +1 -1
- package/dist/DotplotView/1dview.d.ts +2 -77
- package/dist/DotplotView/1dview.js +4 -33
- package/dist/DotplotView/components/Axes.d.ts +5 -6
- package/dist/DotplotView/components/Axes.js +26 -40
- package/dist/DotplotView/components/CursorIcon.d.ts +3 -4
- package/dist/DotplotView/components/CursorIcon.js +3 -5
- package/dist/DotplotView/components/DotplotControls.d.ts +2 -3
- package/dist/DotplotView/components/DotplotControls.js +94 -97
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/dist/DotplotView/components/DotplotView.d.ts +2 -3
- package/dist/DotplotView/components/DotplotView.js +80 -92
- package/dist/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/dist/DotplotView/components/DotplotWarnings.js +26 -21
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/DotplotView/components/ExportSvgDialog.js +32 -67
- package/dist/DotplotView/components/Grid.d.ts +3 -4
- package/dist/DotplotView/components/Grid.js +19 -32
- package/dist/DotplotView/components/Header.d.ts +2 -3
- package/dist/DotplotView/components/Header.js +4 -23
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +129 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -48
- package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/TrackSelector.js +23 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.js +68 -0
- package/dist/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/dist/DotplotView/components/ImportForm/index.js +47 -97
- package/dist/DotplotView/components/ImportForm/util.js +1 -3
- package/dist/DotplotView/components/PanButtons.d.ts +2 -3
- package/dist/DotplotView/components/PanButtons.js +17 -36
- package/dist/DotplotView/components/WarningDialog.d.ts +7 -7
- package/dist/DotplotView/components/WarningDialog.js +12 -15
- package/dist/DotplotView/components/util.d.ts +2 -7
- package/dist/DotplotView/components/util.js +0 -5
- package/dist/DotplotView/index.d.ts +1 -1
- package/dist/DotplotView/index.js +17 -8
- package/dist/DotplotView/model.d.ts +11 -133
- package/dist/DotplotView/model.js +46 -222
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/DotplotView/svgcomponents/SVGBackground.js +3 -6
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/dist/DotplotView/types.d.ts +12 -0
- package/dist/DotplotView/types.js +2 -0
- package/dist/LaunchDotplotView.d.ts +1 -1
- package/dist/LaunchDotplotView.js +1 -4
- package/dist/ServerSideRenderedBlockContent.d.ts +2 -2
- package/dist/ServerSideRenderedBlockContent.js +11 -37
- package/dist/ServerSideSyntenyRendering.d.ts +1 -6
- package/dist/ServerSideSyntenyRendering.js +4 -26
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -6
- package/dist/util.d.ts +1 -1
- package/esm/ComparativeRenderer/index.d.ts +3 -8
- package/esm/ComparativeRenderer/index.js +3 -8
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/esm/DotplotDisplay/components/DotplotDisplay.js +7 -9
- package/esm/DotplotDisplay/index.d.ts +1 -7
- package/esm/DotplotDisplay/index.js +2 -12
- package/esm/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/esm/DotplotDisplay/renderDotplotBlock.js +3 -6
- package/esm/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/esm/DotplotDisplay/stateModelFactory.js +58 -101
- package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +15 -16
- package/esm/DotplotReadVsRef/index.d.ts +1 -1
- package/esm/DotplotReadVsRef/index.js +0 -2
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/esm/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/esm/DotplotRenderer/DotplotRenderer.js +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
- package/esm/DotplotRenderer/configSchema.d.ts +0 -21
- package/esm/DotplotRenderer/configSchema.js +2 -27
- package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/esm/DotplotRenderer/drawDotplot.js +4 -7
- package/esm/DotplotRenderer/index.d.ts +1 -1
- package/esm/DotplotRenderer/index.js +1 -1
- package/esm/DotplotView/1dview.d.ts +2 -77
- package/esm/DotplotView/1dview.js +4 -33
- package/esm/DotplotView/components/Axes.d.ts +5 -6
- package/esm/DotplotView/components/Axes.js +26 -37
- package/esm/DotplotView/components/CursorIcon.d.ts +3 -4
- package/esm/DotplotView/components/CursorIcon.js +3 -5
- package/esm/DotplotView/components/DotplotControls.d.ts +2 -3
- package/esm/DotplotView/components/DotplotControls.js +94 -97
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/esm/DotplotView/components/DotplotView.d.ts +2 -3
- package/esm/DotplotView/components/DotplotView.js +63 -85
- package/esm/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/esm/DotplotView/components/DotplotWarnings.js +9 -14
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/DotplotView/components/ExportSvgDialog.js +32 -44
- package/esm/DotplotView/components/Grid.d.ts +3 -4
- package/esm/DotplotView/components/Grid.js +19 -29
- package/esm/DotplotView/components/Header.d.ts +2 -3
- package/esm/DotplotView/components/Header.js +4 -23
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +124 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -25
- package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/TrackSelector.js +18 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.js +65 -0
- package/esm/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/esm/DotplotView/components/ImportForm/index.js +48 -75
- package/esm/DotplotView/components/ImportForm/util.js +1 -3
- package/esm/DotplotView/components/PanButtons.d.ts +2 -3
- package/esm/DotplotView/components/PanButtons.js +17 -36
- package/esm/DotplotView/components/WarningDialog.d.ts +7 -7
- package/esm/DotplotView/components/WarningDialog.js +12 -12
- package/esm/DotplotView/components/util.d.ts +2 -7
- package/esm/DotplotView/components/util.js +0 -5
- package/esm/DotplotView/index.d.ts +1 -1
- package/esm/DotplotView/index.js +0 -1
- package/esm/DotplotView/model.d.ts +11 -133
- package/esm/DotplotView/model.js +30 -216
- package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/DotplotView/svgcomponents/SVGBackground.js +3 -3
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/esm/DotplotView/types.d.ts +12 -0
- package/esm/DotplotView/types.js +1 -0
- package/esm/LaunchDotplotView.d.ts +1 -1
- package/esm/LaunchDotplotView.js +1 -4
- package/esm/ServerSideRenderedBlockContent.d.ts +2 -2
- package/esm/ServerSideRenderedBlockContent.js +11 -14
- package/esm/ServerSideSyntenyRendering.d.ts +1 -6
- package/esm/ServerSideSyntenyRendering.js +4 -3
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -6
- package/esm/util.d.ts +1 -1
- package/package.json +2 -4
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -194
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -169
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Instance } from 'mobx-state-tree';
|
|
1
|
+
import type { Instance } from 'mobx-state-tree';
|
|
2
2
|
declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
|
|
3
3
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
4
4
|
displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[]>, [undefined]>;
|
|
@@ -53,39 +53,14 @@ declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
|
|
|
53
53
|
} & {
|
|
54
54
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
55
55
|
} & {
|
|
56
|
-
/**
|
|
57
|
-
* #action
|
|
58
|
-
*/
|
|
59
56
|
setScaleFactor(n: number): void;
|
|
60
|
-
/**
|
|
61
|
-
* #action
|
|
62
|
-
*/
|
|
63
57
|
center(): void;
|
|
64
58
|
} & {
|
|
65
|
-
/**
|
|
66
|
-
* #getter
|
|
67
|
-
* this uses padding=false and elision=false
|
|
68
|
-
*/
|
|
69
59
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
70
|
-
/**
|
|
71
|
-
* #getter
|
|
72
|
-
*/
|
|
73
60
|
readonly scaleFactor: number;
|
|
74
|
-
/**
|
|
75
|
-
* #getter
|
|
76
|
-
*/
|
|
77
61
|
readonly maxBpPerPx: number;
|
|
78
|
-
/**
|
|
79
|
-
* #getter
|
|
80
|
-
*/
|
|
81
62
|
readonly minBpPerPx: number;
|
|
82
|
-
/**
|
|
83
|
-
* #getter
|
|
84
|
-
*/
|
|
85
63
|
readonly maxOffset: number;
|
|
86
|
-
/**
|
|
87
|
-
* #getter
|
|
88
|
-
*/
|
|
89
64
|
readonly minOffset: number;
|
|
90
65
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
91
66
|
declare const DotplotHView: import("mobx-state-tree").IModelType<{
|
|
@@ -142,39 +117,14 @@ declare const DotplotHView: import("mobx-state-tree").IModelType<{
|
|
|
142
117
|
} & {
|
|
143
118
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
144
119
|
} & {
|
|
145
|
-
/**
|
|
146
|
-
* #action
|
|
147
|
-
*/
|
|
148
120
|
setScaleFactor(n: number): void;
|
|
149
|
-
/**
|
|
150
|
-
* #action
|
|
151
|
-
*/
|
|
152
121
|
center(): void;
|
|
153
122
|
} & {
|
|
154
|
-
/**
|
|
155
|
-
* #getter
|
|
156
|
-
* this uses padding=false and elision=false
|
|
157
|
-
*/
|
|
158
123
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
159
|
-
/**
|
|
160
|
-
* #getter
|
|
161
|
-
*/
|
|
162
124
|
readonly scaleFactor: number;
|
|
163
|
-
/**
|
|
164
|
-
* #getter
|
|
165
|
-
*/
|
|
166
125
|
readonly maxBpPerPx: number;
|
|
167
|
-
/**
|
|
168
|
-
* #getter
|
|
169
|
-
*/
|
|
170
126
|
readonly minBpPerPx: number;
|
|
171
|
-
/**
|
|
172
|
-
* #getter
|
|
173
|
-
*/
|
|
174
127
|
readonly maxOffset: number;
|
|
175
|
-
/**
|
|
176
|
-
* #getter
|
|
177
|
-
*/
|
|
178
128
|
readonly minOffset: number;
|
|
179
129
|
} & {
|
|
180
130
|
readonly width: any;
|
|
@@ -233,42 +183,17 @@ declare const DotplotVView: import("mobx-state-tree").IModelType<{
|
|
|
233
183
|
} & {
|
|
234
184
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
235
185
|
} & {
|
|
236
|
-
/**
|
|
237
|
-
* #action
|
|
238
|
-
*/
|
|
239
186
|
setScaleFactor(n: number): void;
|
|
240
|
-
/**
|
|
241
|
-
* #action
|
|
242
|
-
*/
|
|
243
187
|
center(): void;
|
|
244
188
|
} & {
|
|
245
|
-
/**
|
|
246
|
-
* #getter
|
|
247
|
-
* this uses padding=false and elision=false
|
|
248
|
-
*/
|
|
249
189
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
250
|
-
/**
|
|
251
|
-
* #getter
|
|
252
|
-
*/
|
|
253
190
|
readonly scaleFactor: number;
|
|
254
|
-
/**
|
|
255
|
-
* #getter
|
|
256
|
-
*/
|
|
257
191
|
readonly maxBpPerPx: number;
|
|
258
|
-
/**
|
|
259
|
-
* #getter
|
|
260
|
-
*/
|
|
261
192
|
readonly minBpPerPx: number;
|
|
262
|
-
/**
|
|
263
|
-
* #getter
|
|
264
|
-
*/
|
|
265
193
|
readonly maxOffset: number;
|
|
266
|
-
/**
|
|
267
|
-
* #getter
|
|
268
|
-
*/
|
|
269
194
|
readonly minOffset: number;
|
|
270
195
|
} & {
|
|
271
196
|
readonly width: any;
|
|
272
197
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
273
|
-
export {
|
|
198
|
+
export { Dotplot1DView, DotplotHView, DotplotVView };
|
|
274
199
|
export type Dotplot1DViewModel = Instance<typeof Dotplot1DView>;
|
|
@@ -1,64 +1,35 @@
|
|
|
1
|
-
import { getParent } from 'mobx-state-tree';
|
|
2
|
-
import { observable } from 'mobx';
|
|
3
1
|
import Base1DView from '@jbrowse/core/util/Base1DViewModel';
|
|
4
2
|
import calculateDynamicBlocks from '@jbrowse/core/util/calculateDynamicBlocks';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
import { observable } from 'mobx';
|
|
4
|
+
import { getParent } from 'mobx-state-tree';
|
|
5
|
+
function x() { }
|
|
10
6
|
const Dotplot1DView = Base1DView.extend(self => {
|
|
11
7
|
const scaleFactor = observable.box(1);
|
|
12
8
|
return {
|
|
13
9
|
views: {
|
|
14
|
-
/**
|
|
15
|
-
* #getter
|
|
16
|
-
* this uses padding=false and elision=false
|
|
17
|
-
*/
|
|
18
10
|
get dynamicBlocks() {
|
|
19
11
|
return calculateDynamicBlocks(self, false, false);
|
|
20
12
|
},
|
|
21
|
-
/**
|
|
22
|
-
* #getter
|
|
23
|
-
*/
|
|
24
13
|
get scaleFactor() {
|
|
25
14
|
return scaleFactor.get();
|
|
26
15
|
},
|
|
27
|
-
/**
|
|
28
|
-
* #getter
|
|
29
|
-
*/
|
|
30
16
|
get maxBpPerPx() {
|
|
31
17
|
return self.totalBp / (self.width - 50);
|
|
32
18
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #getter
|
|
35
|
-
*/
|
|
36
19
|
get minBpPerPx() {
|
|
37
20
|
return 1 / 50;
|
|
38
21
|
},
|
|
39
|
-
/**
|
|
40
|
-
* #getter
|
|
41
|
-
*/
|
|
42
22
|
get maxOffset() {
|
|
43
23
|
return self.displayedRegionsTotalPx - self.width * 0.2;
|
|
44
24
|
},
|
|
45
|
-
/**
|
|
46
|
-
* #getter
|
|
47
|
-
*/
|
|
48
25
|
get minOffset() {
|
|
49
26
|
return -self.width * 0.8;
|
|
50
27
|
},
|
|
51
28
|
},
|
|
52
29
|
actions: {
|
|
53
|
-
/**
|
|
54
|
-
* #action
|
|
55
|
-
*/
|
|
56
30
|
setScaleFactor(n) {
|
|
57
31
|
scaleFactor.set(n);
|
|
58
32
|
},
|
|
59
|
-
/**
|
|
60
|
-
* #action
|
|
61
|
-
*/
|
|
62
33
|
center() {
|
|
63
34
|
const centerBp = self.totalBp / 2;
|
|
64
35
|
const centerPx = centerBp / self.bpPerPx;
|
|
@@ -81,4 +52,4 @@ const DotplotVView = Dotplot1DView.extend(self => ({
|
|
|
81
52
|
},
|
|
82
53
|
},
|
|
83
54
|
}));
|
|
84
|
-
export {
|
|
55
|
+
export { Dotplot1DView, DotplotHView, DotplotVView };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
export declare const HorizontalAxis: ({ model, }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export declare const HorizontalAxisRaw: ({ model, }: {
|
|
7
6
|
model: DotplotViewModel;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export declare const VerticalAxis: ({ model, }: {
|
|
10
9
|
model: DotplotViewModel;
|
|
11
|
-
}) =>
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export declare const VerticalAxisRaw: ({ model, }: {
|
|
13
12
|
model: DotplotViewModel;
|
|
14
|
-
}) =>
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { makeStyles } from 'tss-react/mui';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
|
-
import { getSnapshot } from 'mobx-state-tree';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
2
|
import { getFillProps, getStrokeProps, getTickDisplayStr, } from '@jbrowse/core/util';
|
|
6
3
|
import { bpToPx } from '@jbrowse/core/util/Base1DUtils';
|
|
7
4
|
import { useTheme } from '@mui/material';
|
|
8
|
-
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { getSnapshot } from 'mobx-state-tree';
|
|
7
|
+
import { makeStyles } from 'tss-react/mui';
|
|
9
8
|
import { getBlockLabelKeysToHide } from './util';
|
|
10
9
|
const useStyles = makeStyles()(() => ({
|
|
11
10
|
vtext: {
|
|
@@ -24,8 +23,7 @@ const useStyles = makeStyles()(() => ({
|
|
|
24
23
|
export const HorizontalAxis = observer(function ({ model, }) {
|
|
25
24
|
const { viewWidth, borderY } = model;
|
|
26
25
|
const { classes } = useStyles();
|
|
27
|
-
return (
|
|
28
|
-
React.createElement(HorizontalAxisRaw, { model: model })));
|
|
26
|
+
return (_jsx("svg", { width: viewWidth, height: borderY, className: classes.htext, children: _jsx(HorizontalAxisRaw, { model: model }) }));
|
|
29
27
|
});
|
|
30
28
|
export const HorizontalAxisRaw = observer(function ({ model, }) {
|
|
31
29
|
const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model;
|
|
@@ -52,26 +50,21 @@ export const HorizontalAxisRaw = observer(function ({ model, }) {
|
|
|
52
50
|
})
|
|
53
51
|
.filter(f => f[1] !== undefined)
|
|
54
52
|
.map(f => [f[0], f[1] - offsetPx]);
|
|
55
|
-
return (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
ticks
|
|
66
|
-
.filter(t => t[0].type === 'major')
|
|
67
|
-
.map(([tick, x]) => x > 10 && x < width ? (React.createElement("text", { x: x - 7, y: 0, transform: `rotate(${htextRotation},${x},0)`, key: `text-${JSON.stringify(tick)}`, fontSize: 11, dominantBaseline: "middle", textAnchor: "end", ...getFillProps(theme.palette.text.primary) }, getTickDisplayStr(tick.base + 1, bpPerPx))) : null),
|
|
68
|
-
React.createElement("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging", ...getFillProps(theme.palette.text.primary) }, hview.assemblyNames.join(','))));
|
|
53
|
+
return (_jsxs(_Fragment, { children: [dblocks
|
|
54
|
+
.filter(region => !hide.has(region.key))
|
|
55
|
+
.map(region => {
|
|
56
|
+
const x = region.offsetPx;
|
|
57
|
+
const y = 0;
|
|
58
|
+
const xoff = Math.floor(x - hview.offsetPx);
|
|
59
|
+
return (_jsx("text", { transform: `rotate(${htextRotation},${xoff},${y})`, x: xoff, y: y + 1, fontSize: 11, dominantBaseline: "hanging", textAnchor: "end", ...getFillProps(theme.palette.text.primary), children: region.refName }, JSON.stringify(region)));
|
|
60
|
+
}), ticks.map(([tick, x]) => x > 0 && x < width ? (_jsx("line", { x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, ...getFillProps(theme.palette.text.primary) }, `line-${JSON.stringify(tick)}`)) : null), ticks
|
|
61
|
+
.filter(t => t[0].type === 'major')
|
|
62
|
+
.map(([tick, x]) => x > 10 && x < width ? (_jsx("text", { x: x - 7, y: 0, transform: `rotate(${htextRotation},${x},0)`, fontSize: 11, dominantBaseline: "middle", textAnchor: "end", ...getFillProps(theme.palette.text.primary), children: getTickDisplayStr(tick.base + 1, bpPerPx) }, `text-${JSON.stringify(tick)}`)) : null), _jsx("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging", ...getFillProps(theme.palette.text.primary), children: hview.assemblyNames.join(',') })] }));
|
|
69
63
|
});
|
|
70
64
|
export const VerticalAxis = observer(function ({ model, }) {
|
|
71
65
|
const { borderX, viewHeight } = model;
|
|
72
66
|
const { classes } = useStyles();
|
|
73
|
-
return (
|
|
74
|
-
React.createElement(VerticalAxisRaw, { model: model })));
|
|
67
|
+
return (_jsx("svg", { className: classes.vtext, width: borderX, height: viewHeight, children: _jsx(VerticalAxisRaw, { model: model }) }));
|
|
75
68
|
});
|
|
76
69
|
export const VerticalAxisRaw = observer(function ({ model, }) {
|
|
77
70
|
const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model;
|
|
@@ -98,18 +91,14 @@ export const VerticalAxisRaw = observer(function ({ model, }) {
|
|
|
98
91
|
})
|
|
99
92
|
.filter(f => f[1] !== undefined)
|
|
100
93
|
.map(f => [f[0], f[1] - offsetPx]);
|
|
101
|
-
return (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
ticks
|
|
112
|
-
.filter(t => t[0].type === 'major')
|
|
113
|
-
.map(([tick, y]) => y > 10 && y < viewHeight ? (React.createElement("text", { y: viewHeight - y - 3, x: borderX - 7, key: `text-${JSON.stringify(tick)}`, textAnchor: "end", dominantBaseline: "hanging", fontSize: 11, ...getFillProps(theme.palette.text.primary) }, getTickDisplayStr(tick.base + 1, bpPerPx))) : null),
|
|
114
|
-
React.createElement("text", { y: (viewHeight - borderY) / 2, x: 12, transform: `rotate(-90,12,${(viewHeight - borderY) / 2})`, textAnchor: "middle", fontSize: 11, ...getFillProps(theme.palette.text.primary) }, vview.assemblyNames.join(','))));
|
|
94
|
+
return (_jsxs(_Fragment, { children: [dblocks
|
|
95
|
+
.filter(region => !hide.has(region.key))
|
|
96
|
+
.map(region => {
|
|
97
|
+
const y = region.offsetPx;
|
|
98
|
+
const x = borderX;
|
|
99
|
+
const yoff = Math.floor(viewHeight - y + offsetPx);
|
|
100
|
+
return (_jsx("text", { transform: `rotate(${vtextRotation},${x},${y})`, x: x, y: yoff, fontSize: 11, textAnchor: "end", ...getFillProps(theme.palette.text.primary), children: region.refName }, JSON.stringify(region)));
|
|
101
|
+
}), ticks.map(([tick, y]) => y > 0 ? (_jsx("line", { y1: viewHeight - y, y2: viewHeight - y, x1: borderX, x2: borderX - (tick.type === 'major' ? 6 : 4), strokeWidth: 1, ...getStrokeProps(theme.palette.grey[400]) }, `line-${JSON.stringify(tick)}`)) : null), ticks
|
|
102
|
+
.filter(t => t[0].type === 'major')
|
|
103
|
+
.map(([tick, y]) => y > 10 && y < viewHeight ? (_jsx("text", { y: viewHeight - y - 3, x: borderX - 7, textAnchor: "end", dominantBaseline: "hanging", fontSize: 11, ...getFillProps(theme.palette.text.primary), children: getTickDisplayStr(tick.base + 1, bpPerPx) }, `text-${JSON.stringify(tick)}`)) : null), _jsx("text", { y: (viewHeight - borderY) / 2, x: 12, transform: `rotate(-90,12,${(viewHeight - borderY) / 2})`, textAnchor: "middle", fontSize: 11, ...getFillProps(theme.palette.text.primary), children: vview.assemblyNames.join(',') })] }));
|
|
115
104
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function CursorMouse(props: SvgIconProps): React.JSX.Element;
|
|
1
|
+
import type { SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
|
+
export declare function CursorMove(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function CursorMouse(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import SvgIcon from '@mui/material/SvgIcon';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
export function CursorMove(props) {
|
|
4
|
-
return (
|
|
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" })));
|
|
4
|
+
return (_jsx(SvgIcon, { ...props, children: _jsx("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
5
|
}
|
|
7
6
|
export function CursorMouse(props) {
|
|
8
|
-
return (
|
|
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" })));
|
|
7
|
+
return (_jsx(SvgIcon, { ...props, children: _jsx("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
8
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
declare const DotplotControls: ({ model, }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default DotplotControls;
|
|
@@ -1,113 +1,110 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IconButton } from '@mui/material';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
2
|
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
4
|
+
import CropDinIcon from '@mui/icons-material/CropDin';
|
|
5
|
+
import CropLandscapeIcon from '@mui/icons-material/CropLandscape';
|
|
8
6
|
import MoreVert from '@mui/icons-material/MoreVert';
|
|
7
|
+
import SettingsOverscanIcon from '@mui/icons-material/SettingsOverscan';
|
|
8
|
+
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
9
|
+
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
10
|
+
import { IconButton } from '@mui/material';
|
|
11
|
+
import { observer } from 'mobx-react';
|
|
9
12
|
import { CursorMouse, CursorMove } from './CursorIcon';
|
|
10
|
-
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
11
13
|
const DotplotControls = observer(function ({ model, }) {
|
|
12
|
-
return (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
React.createElement(CascadingMenuButton, { menuItems: [
|
|
24
|
-
{
|
|
25
|
-
onClick: () => {
|
|
26
|
-
model.squareView();
|
|
14
|
+
return (_jsxs("div", { children: [_jsx(IconButton, { onClick: () => {
|
|
15
|
+
model.zoomOut();
|
|
16
|
+
}, children: _jsx(ZoomOut, {}) }), _jsx(IconButton, { onClick: () => {
|
|
17
|
+
model.zoomIn();
|
|
18
|
+
}, children: _jsx(ZoomIn, {}) }), _jsx(IconButton, { onClick: () => model.activateTrackSelector(), title: "Open track selector", children: _jsx(TrackSelectorIcon, {}) }), _jsx(CascadingMenuButton, { menuItems: [
|
|
19
|
+
{
|
|
20
|
+
label: 'Square view - same bp per pixel',
|
|
21
|
+
icon: CropDinIcon,
|
|
22
|
+
onClick: () => {
|
|
23
|
+
model.squareView();
|
|
24
|
+
},
|
|
27
25
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
{
|
|
27
|
+
label: 'Rectangular view - same total bp',
|
|
28
|
+
icon: CropLandscapeIcon,
|
|
29
|
+
onClick: () => {
|
|
30
|
+
model.squareViewProportional();
|
|
31
|
+
},
|
|
33
32
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
{
|
|
34
|
+
label: 'Show all regions',
|
|
35
|
+
icon: SettingsOverscanIcon,
|
|
36
|
+
onClick: () => {
|
|
37
|
+
model.showAllRegions();
|
|
38
|
+
},
|
|
39
39
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
{
|
|
41
|
+
type: 'checkbox',
|
|
42
|
+
label: 'Draw CIGAR',
|
|
43
|
+
checked: model.drawCigar,
|
|
44
|
+
onClick: () => {
|
|
45
|
+
model.setDrawCigar(!model.drawCigar);
|
|
46
|
+
},
|
|
45
47
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
{
|
|
49
|
+
label: 'Show pan buttons',
|
|
50
|
+
type: 'checkbox',
|
|
51
|
+
checked: model.showPanButtons,
|
|
52
|
+
onClick: () => {
|
|
53
|
+
model.setShowPanButtons(!model.showPanButtons);
|
|
54
|
+
},
|
|
53
55
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
{
|
|
57
|
+
label: 'Click and drag mode',
|
|
58
|
+
subMenu: [
|
|
59
|
+
{
|
|
60
|
+
label: 'Pan by default, select region when ctrl/cmd key is held',
|
|
61
|
+
icon: CursorMove,
|
|
62
|
+
type: 'radio',
|
|
63
|
+
checked: model.cursorMode === 'move',
|
|
64
|
+
onClick: () => {
|
|
65
|
+
model.setCursorMode('move');
|
|
66
|
+
},
|
|
64
67
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
{
|
|
69
|
+
label: 'Select region by default, pan when ctrl/cmd key is held',
|
|
70
|
+
icon: CursorMouse,
|
|
71
|
+
type: 'radio',
|
|
72
|
+
checked: model.cursorMode === 'crosshair',
|
|
73
|
+
onClick: () => {
|
|
74
|
+
model.setCursorMode('crosshair');
|
|
75
|
+
},
|
|
73
76
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
model.setWheelMode('pan');
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: 'Wheel scroll mode',
|
|
81
|
+
subMenu: [
|
|
82
|
+
{
|
|
83
|
+
label: 'Pans view',
|
|
84
|
+
type: 'radio',
|
|
85
|
+
checked: model.wheelMode === 'pan',
|
|
86
|
+
onClick: () => {
|
|
87
|
+
model.setWheelMode('pan');
|
|
88
|
+
},
|
|
87
89
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
{
|
|
91
|
+
label: 'Zooms view',
|
|
92
|
+
type: 'radio',
|
|
93
|
+
checked: model.wheelMode === 'zoom',
|
|
94
|
+
onClick: () => {
|
|
95
|
+
model.setWheelMode('zoom');
|
|
96
|
+
},
|
|
95
97
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
{
|
|
99
|
+
label: 'Disable',
|
|
100
|
+
type: 'radio',
|
|
101
|
+
checked: model.wheelMode === 'none',
|
|
102
|
+
onClick: () => {
|
|
103
|
+
model.setWheelMode('none');
|
|
104
|
+
},
|
|
103
105
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
] },
|
|
111
|
-
React.createElement(MoreVert, null))));
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
], children: _jsx(MoreVert, {}) })] }));
|
|
112
109
|
});
|
|
113
110
|
export default DotplotControls;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
type Coord = [number, number] | undefined;
|
|
4
3
|
export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
|
|
5
4
|
model: DotplotViewModel;
|
|
@@ -7,5 +6,5 @@ export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient,
|
|
|
7
6
|
mousedownClient: Coord;
|
|
8
7
|
xdistance: number;
|
|
9
8
|
ydistance: number;
|
|
10
|
-
}) =>
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
10
|
export default DotplotTooltipClick;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
import { locstr } from './util';
|
|
5
5
|
export const DotplotTooltipClick = observer(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
|
|
6
6
|
const { hview, vview, viewHeight } = model;
|
|
7
7
|
const x = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[0]) || 0) - (xdistance < 0 ? 0 : 0);
|
|
8
8
|
const y = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[1]) || 0) - (ydistance < 0 ? 0 : 0);
|
|
9
|
-
return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (
|
|
10
|
-
`x - ${locstr(mousedown[0], hview)}`,
|
|
11
|
-
React.createElement("br", null),
|
|
12
|
-
`y - ${locstr(viewHeight - mousedown[1], vview)}`,
|
|
13
|
-
React.createElement("br", null))) : null;
|
|
9
|
+
return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (_jsxs(BaseTooltip, { placement: xdistance < 0 ? 'right' : 'left', clientPoint: { x, y }, children: [`x - ${locstr(mousedown[0], hview)}`, _jsx("br", {}), `y - ${locstr(viewHeight - mousedown[1], vview)}`, _jsx("br", {})] })) : null;
|
|
14
10
|
});
|
|
15
11
|
export default DotplotTooltipClick;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
type Coord = [number, number] | undefined;
|
|
4
3
|
declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
|
|
5
4
|
model: DotplotViewModel;
|
|
6
5
|
mouserect: Coord;
|
|
7
6
|
mouserectClient: Coord;
|
|
8
7
|
xdistance: number;
|
|
9
|
-
}) =>
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
9
|
export default DotplotTooltipMouseover;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
import { locstr } from './util';
|
|
5
5
|
const DotplotTooltipMouseover = observer(function ({ model, mouserect, mouserectClient, xdistance, }) {
|
|
6
6
|
const { hview, vview, viewHeight } = model;
|
|
7
|
-
return mouserect ? (
|
|
7
|
+
return mouserect ? (_jsxs(BaseTooltip, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
|
|
8
8
|
? { x: mouserectClient[0], y: mouserectClient[1] }
|
|
9
|
-
: undefined },
|
|
10
|
-
`x - ${locstr(mouserect[0], hview)}`,
|
|
11
|
-
React.createElement("br", null),
|
|
12
|
-
`y - ${locstr(viewHeight - mouserect[1], vview)}`,
|
|
13
|
-
React.createElement("br", null))) : null;
|
|
9
|
+
: undefined, children: [`x - ${locstr(mouserect[0], hview)}`, _jsx("br", {}), `y - ${locstr(viewHeight - mouserect[1], vview)}`, _jsx("br", {})] })) : null;
|
|
14
10
|
});
|
|
15
11
|
export default DotplotTooltipMouseover;
|