@jbrowse/plugin-wiggle 2.3.0 → 2.3.2
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/LinearWiggleDisplay/components/Tooltip.d.ts +3 -2
- package/dist/LinearWiggleDisplay/components/Tooltip.js +2 -2
- package/dist/LinearWiggleDisplay/components/Tooltip.js.map +1 -1
- package/esm/LinearWiggleDisplay/components/Tooltip.d.ts +3 -2
- package/esm/LinearWiggleDisplay/components/Tooltip.js +2 -2
- package/esm/LinearWiggleDisplay/components/Tooltip.js.map +1 -1
- package/package.json +2 -2
- package/src/LinearWiggleDisplay/components/Tooltip.tsx +42 -39
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Feature } from '@jbrowse/core/util';
|
|
3
3
|
import Tooltip, { TooltipContentsComponent } from '../../Tooltip';
|
|
4
|
-
|
|
4
|
+
interface Props {
|
|
5
5
|
feature: Feature;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
|
+
declare const TooltipContents: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
7
8
|
type Coord = [number, number];
|
|
8
9
|
declare const WiggleTooltip: (props: {
|
|
9
10
|
model: {
|
|
@@ -11,7 +11,7 @@ const Tooltip_1 = __importDefault(require("../../Tooltip"));
|
|
|
11
11
|
exports.Tooltip = Tooltip_1.default;
|
|
12
12
|
const util_1 = require("../../util");
|
|
13
13
|
const en = (n) => n.toLocaleString('en-US');
|
|
14
|
-
const TooltipContents = react_1.default.forwardRef(({ feature }, ref)
|
|
14
|
+
const TooltipContents = react_1.default.forwardRef(function ({ feature }, ref) {
|
|
15
15
|
const start = feature.get('start');
|
|
16
16
|
const end = feature.get('end');
|
|
17
17
|
const name = feature.get('refName');
|
|
@@ -33,7 +33,7 @@ const TooltipContents = react_1.default.forwardRef(({ feature }, ref) => {
|
|
|
33
33
|
react_1.default.createElement("br", null),
|
|
34
34
|
`${(0, util_1.toP)(feature.get('score'))}`));
|
|
35
35
|
});
|
|
36
|
-
const WiggleTooltip = (0, mobx_react_1.observer)((props)
|
|
36
|
+
const WiggleTooltip = (0, mobx_react_1.observer)(function (props) {
|
|
37
37
|
return react_1.default.createElement(Tooltip_1.default, { TooltipContents: TooltipContents, ...props });
|
|
38
38
|
});
|
|
39
39
|
exports.default = WiggleTooltip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/LinearWiggleDisplay/components/Tooltip.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,2CAAqC;AAGrC,SAAS;AACT,4DAAiE;
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/LinearWiggleDisplay/components/Tooltip.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,2CAAqC;AAGrC,SAAS;AACT,4DAAiE;AAoDxD,kBApDF,iBAAO,CAoDE;AAnDhB,qCAAgC;AAEhC,MAAM,EAAE,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;AAMnD,MAAM,eAAe,GAAG,eAAK,CAAC,UAAU,CAAwB,UAC9D,EAAE,OAAO,EAAE,EACX,GAAG;IAEH,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC9B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACnC,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;SACvE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SAChB,IAAI,CAAC,GAAG,CAAC,CAAA;IAEZ,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAC5C,uCAAK,GAAG,EAAE,GAAG;QACV,GAAG;QACJ,yCAAM;;QACA,IAAA,UAAG,EAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAClC,yCAAM;;QACA,IAAA,UAAG,EAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,yCAAM;;QACA,IAAA,UAAG,EAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAC9B,CACP,CAAC,CAAC,CAAC,CACF,uCAAK,GAAG,EAAE,GAAG;QACV,GAAG;QACJ,yCAAM;QACL,GAAG,IAAA,UAAG,EAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAC3B,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAIF,MAAM,aAAa,GAAG,IAAA,qBAAQ,EAAC,UAAU,KAOxC;IACC,OAAO,8BAAC,iBAAO,IAAC,eAAe,EAAE,eAAe,KAAM,KAAK,GAAI,CAAA;AACjE,CAAC,CAAC,CAAA;AACF,kBAAe,aAAa,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Feature } from '@jbrowse/core/util';
|
|
3
3
|
import Tooltip, { TooltipContentsComponent } from '../../Tooltip';
|
|
4
|
-
|
|
4
|
+
interface Props {
|
|
5
5
|
feature: Feature;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
|
+
declare const TooltipContents: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
7
8
|
type Coord = [number, number];
|
|
8
9
|
declare const WiggleTooltip: (props: {
|
|
9
10
|
model: {
|
|
@@ -4,7 +4,7 @@ import { observer } from 'mobx-react';
|
|
|
4
4
|
import Tooltip from '../../Tooltip';
|
|
5
5
|
import { toP } from '../../util';
|
|
6
6
|
const en = (n) => n.toLocaleString('en-US');
|
|
7
|
-
const TooltipContents = React.forwardRef(({ feature }, ref)
|
|
7
|
+
const TooltipContents = React.forwardRef(function ({ feature }, ref) {
|
|
8
8
|
const start = feature.get('start');
|
|
9
9
|
const end = feature.get('end');
|
|
10
10
|
const name = feature.get('refName');
|
|
@@ -26,7 +26,7 @@ const TooltipContents = React.forwardRef(({ feature }, ref) => {
|
|
|
26
26
|
React.createElement("br", null),
|
|
27
27
|
`${toP(feature.get('score'))}`));
|
|
28
28
|
});
|
|
29
|
-
const WiggleTooltip = observer((props)
|
|
29
|
+
const WiggleTooltip = observer(function (props) {
|
|
30
30
|
return React.createElement(Tooltip, { TooltipContents: TooltipContents, ...props });
|
|
31
31
|
});
|
|
32
32
|
export default WiggleTooltip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/LinearWiggleDisplay/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,SAAS;AACT,OAAO,OAAqC,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEhC,MAAM,EAAE,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/LinearWiggleDisplay/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,SAAS;AACT,OAAO,OAAqC,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA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aAAa,GAAG,QAAQ,CAAC,UAAU,KAOxC;IACC,OAAO,oBAAC,OAAO,IAAC,eAAe,EAAE,eAAe,KAAM,KAAK,GAAI,CAAA;AACjE,CAAC,CAAC,CAAA;AACF,eAAe,aAAa,CAAA;AAC5B,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-wiggle",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "JBrowse 2 wiggle adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"distModule": "esm/index.js",
|
|
70
70
|
"srcModule": "src/index.ts",
|
|
71
71
|
"module": "esm/index.js",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "467d973535bb7b2664e9f66311fb0dc21c1ce5ba"
|
|
73
73
|
}
|
|
@@ -8,48 +8,51 @@ import { toP } from '../../util'
|
|
|
8
8
|
|
|
9
9
|
const en = (n: number) => n.toLocaleString('en-US')
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const end = feature.get('end')
|
|
15
|
-
const name = feature.get('refName')
|
|
16
|
-
const loc = [name, start === end ? en(start) : `${en(start)}..${en(end)}`]
|
|
17
|
-
.filter(f => !!f)
|
|
18
|
-
.join(':')
|
|
11
|
+
interface Props {
|
|
12
|
+
feature: Feature
|
|
13
|
+
}
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
const TooltipContents = React.forwardRef<HTMLDivElement, Props>(function (
|
|
16
|
+
{ feature },
|
|
17
|
+
ref,
|
|
18
|
+
) {
|
|
19
|
+
const start = feature.get('start')
|
|
20
|
+
const end = feature.get('end')
|
|
21
|
+
const name = feature.get('refName')
|
|
22
|
+
const loc = [name, start === end ? en(start) : `${en(start)}..${en(end)}`]
|
|
23
|
+
.filter(f => !!f)
|
|
24
|
+
.join(':')
|
|
25
|
+
|
|
26
|
+
return feature.get('summary') !== undefined ? (
|
|
27
|
+
<div ref={ref}>
|
|
28
|
+
{loc}
|
|
29
|
+
<br />
|
|
30
|
+
Max: {toP(feature.get('maxScore'))}
|
|
31
|
+
<br />
|
|
32
|
+
Avg: {toP(feature.get('score'))}
|
|
33
|
+
<br />
|
|
34
|
+
Min: {toP(feature.get('minScore'))}
|
|
35
|
+
</div>
|
|
36
|
+
) : (
|
|
37
|
+
<div ref={ref}>
|
|
38
|
+
{loc}
|
|
39
|
+
<br />
|
|
40
|
+
{`${toP(feature.get('score'))}`}
|
|
41
|
+
</div>
|
|
42
|
+
)
|
|
43
|
+
})
|
|
39
44
|
|
|
40
45
|
type Coord = [number, number]
|
|
41
46
|
|
|
42
|
-
const WiggleTooltip = observer(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
)
|
|
47
|
+
const WiggleTooltip = observer(function (props: {
|
|
48
|
+
model: { featureUnderMouse: Feature }
|
|
49
|
+
height: number
|
|
50
|
+
offsetMouseCoord: Coord
|
|
51
|
+
clientMouseCoord: Coord
|
|
52
|
+
clientRect?: DOMRect
|
|
53
|
+
TooltipContents?: TooltipContentsComponent
|
|
54
|
+
}) {
|
|
55
|
+
return <Tooltip TooltipContents={TooltipContents} {...props} />
|
|
56
|
+
})
|
|
54
57
|
export default WiggleTooltip
|
|
55
58
|
export { Tooltip }
|