react-msaview 2.1.4 → 2.1.5
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/bundle/index.js +250 -32
- package/dist/components/MSAMouseoverCanvas.js +11 -2
- package/dist/components/MSAMouseoverCanvas.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/src/components/MSAMouseoverCanvas.tsx +13 -1
- package/src/version.ts +1 -1
|
@@ -3,7 +3,9 @@ import { observer } from 'mobx-react';
|
|
|
3
3
|
import { sum } from '@jbrowse/core/util';
|
|
4
4
|
const MSAMouseoverCanvas = observer(function ({ model, }) {
|
|
5
5
|
const ref = useRef(null);
|
|
6
|
-
const { height, width, treeAreaWidth, resizeHandleWidth, rulerHeight, turnedOnTracks, scrollX, scrollY, mouseCol,
|
|
6
|
+
const { height, width, treeAreaWidth, resizeHandleWidth, rulerHeight, turnedOnTracks, scrollX, scrollY, mouseCol,
|
|
7
|
+
// @ts-expect-error
|
|
8
|
+
mouseCol2, mouseRow, rowHeight, colWidth, } = model;
|
|
7
9
|
const totalTrackAreaHeight = sum(turnedOnTracks.map(r => r.model.height));
|
|
8
10
|
useEffect(() => {
|
|
9
11
|
if (!ref.current) {
|
|
@@ -15,17 +17,24 @@ const MSAMouseoverCanvas = observer(function ({ model, }) {
|
|
|
15
17
|
}
|
|
16
18
|
ctx.resetTransform();
|
|
17
19
|
ctx.clearRect(0, 0, width, height);
|
|
18
|
-
ctx.fillStyle = 'rgba(0,0,0,0.15)';
|
|
19
20
|
if (mouseCol !== undefined) {
|
|
21
|
+
ctx.fillStyle = 'rgba(0,0,0,0.15)';
|
|
20
22
|
const x = (mouseCol - 1) * colWidth + scrollX + treeAreaWidth + resizeHandleWidth;
|
|
21
23
|
ctx.fillRect(x, 0, colWidth, height);
|
|
22
24
|
}
|
|
23
25
|
if (mouseRow !== undefined) {
|
|
26
|
+
ctx.fillStyle = 'rgba(0,0,0,0.15)';
|
|
24
27
|
const y = mouseRow * rowHeight + scrollY + rulerHeight + totalTrackAreaHeight;
|
|
25
28
|
ctx.fillRect(treeAreaWidth + resizeHandleWidth, y, width, rowHeight);
|
|
26
29
|
}
|
|
30
|
+
if (mouseCol2 !== undefined) {
|
|
31
|
+
ctx.fillStyle = 'rgba(255,255,0,0.2)';
|
|
32
|
+
const x = (mouseCol2 - 1) * colWidth + scrollX + treeAreaWidth + resizeHandleWidth;
|
|
33
|
+
ctx.fillRect(x, 0, colWidth, height);
|
|
34
|
+
}
|
|
27
35
|
}, [
|
|
28
36
|
mouseCol,
|
|
37
|
+
mouseCol2,
|
|
29
38
|
colWidth,
|
|
30
39
|
scrollY,
|
|
31
40
|
totalTrackAreaHeight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MSAMouseoverCanvas.js","sourceRoot":"","sources":["../../src/components/MSAMouseoverCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AAExC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,UAAU,EAC5C,KAAK,GAGN;IACC,MAAM,GAAG,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAA;IAC3C,MAAM,EACJ,MAAM,EACN,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,OAAO,EACP,OAAO,EACP,QAAQ,
|
|
1
|
+
{"version":3,"file":"MSAMouseoverCanvas.js","sourceRoot":"","sources":["../../src/components/MSAMouseoverCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC,OAAO,EAAE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G,OAAO,GAAG,WAAW,GAAG,oBAAoB,CAAA;YACrE,GAAG,CAAC,QAAQ,CAAC,aAAa,GAAG,iBAAiB,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;SACrE;QACD,IAAI,SAAS,KAAK,SAAS,EAAE;YAC3B,GAAG,CAAC,SAAS,GAAG,qBAAqB,CAAA;YACrC,MAAM,CAAC,GACL,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,GAAG,iBAAiB,CAAA;YAE1E,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;SACrC;IACH,CAAC,EAAE;QACD,QAAQ;QACR,SAAS;QACT,QAAQ;QACR,OAAO;QACP,oBAAoB;QACpB,QAAQ;QACR,SAAS;QACT,WAAW;QACX,OAAO;QACP,MAAM;QACN,iBAAiB;QACjB,aAAa;QACb,KAAK;KACN,CAAC,CAAA;IAEF,OAAO,CACL,gCACE,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK;YACL,MAAM;YACN,MAAM,EAAE,IAAI;YACZ,aAAa,EAAE,MAAM;SACtB,GACD,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,kBAAkB,CAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.1.
|
|
1
|
+
export declare const version = "2.1.5";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '2.1.
|
|
1
|
+
export const version = '2.1.5';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-msaview",
|
|
3
3
|
"author": "Colin",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -38,13 +38,14 @@
|
|
|
38
38
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
39
39
|
"@rollup/plugin-json": "^6.0.0",
|
|
40
40
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
41
|
-
"@rollup/plugin-replace": "^5.0.
|
|
41
|
+
"@rollup/plugin-replace": "^5.0.5",
|
|
42
42
|
"@rollup/plugin-terser": "^0.4.1",
|
|
43
43
|
"@rollup/plugin-typescript": "^11.1.0",
|
|
44
44
|
"@types/color": "^3.0.1",
|
|
45
45
|
"@types/d3": "^7.4.0",
|
|
46
|
-
"@types/react": "^18.2.
|
|
46
|
+
"@types/react": "^18.2.33",
|
|
47
47
|
"@types/react-dom": "^18.2.1",
|
|
48
|
+
"eslint-plugin-unicorn": "^49.0.0",
|
|
48
49
|
"rollup": "^3.0.2",
|
|
49
50
|
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
50
51
|
"slugify": "^1.6.6",
|
|
@@ -21,6 +21,8 @@ const MSAMouseoverCanvas = observer(function ({
|
|
|
21
21
|
scrollX,
|
|
22
22
|
scrollY,
|
|
23
23
|
mouseCol,
|
|
24
|
+
// @ts-expect-error
|
|
25
|
+
mouseCol2,
|
|
24
26
|
mouseRow,
|
|
25
27
|
rowHeight,
|
|
26
28
|
colWidth,
|
|
@@ -39,20 +41,30 @@ const MSAMouseoverCanvas = observer(function ({
|
|
|
39
41
|
ctx.resetTransform()
|
|
40
42
|
ctx.clearRect(0, 0, width, height)
|
|
41
43
|
|
|
42
|
-
ctx.fillStyle = 'rgba(0,0,0,0.15)'
|
|
43
44
|
if (mouseCol !== undefined) {
|
|
45
|
+
ctx.fillStyle = 'rgba(0,0,0,0.15)'
|
|
44
46
|
const x =
|
|
45
47
|
(mouseCol - 1) * colWidth + scrollX + treeAreaWidth + resizeHandleWidth
|
|
46
48
|
|
|
47
49
|
ctx.fillRect(x, 0, colWidth, height)
|
|
48
50
|
}
|
|
51
|
+
|
|
49
52
|
if (mouseRow !== undefined) {
|
|
53
|
+
ctx.fillStyle = 'rgba(0,0,0,0.15)'
|
|
50
54
|
const y =
|
|
51
55
|
mouseRow * rowHeight + scrollY + rulerHeight + totalTrackAreaHeight
|
|
52
56
|
ctx.fillRect(treeAreaWidth + resizeHandleWidth, y, width, rowHeight)
|
|
53
57
|
}
|
|
58
|
+
if (mouseCol2 !== undefined) {
|
|
59
|
+
ctx.fillStyle = 'rgba(255,255,0,0.2)'
|
|
60
|
+
const x =
|
|
61
|
+
(mouseCol2 - 1) * colWidth + scrollX + treeAreaWidth + resizeHandleWidth
|
|
62
|
+
|
|
63
|
+
ctx.fillRect(x, 0, colWidth, height)
|
|
64
|
+
}
|
|
54
65
|
}, [
|
|
55
66
|
mouseCol,
|
|
67
|
+
mouseCol2,
|
|
56
68
|
colWidth,
|
|
57
69
|
scrollY,
|
|
58
70
|
totalTrackAreaHeight,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.1.
|
|
1
|
+
export const version = '2.1.5'
|