@vitessce/heatmap 3.0.1 → 3.1.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/{deflate-6ff65b5f.js → deflate-d508d4a0.js} +1 -1
- package/dist/{index-047725f9.js → index-2a959f7f.js} +351 -635
- package/dist/index.js +1 -1
- package/dist/{jpeg-7841016e.js → jpeg-d33c98fc.js} +1 -1
- package/dist/{lerc-566b409f.js → lerc-10fe8c3f.js} +1 -1
- package/dist/{lzw-b36101c3.js → lzw-b482148a.js} +1 -1
- package/dist/{packbits-cb32e60c.js → packbits-09f27b8f.js} +1 -1
- package/dist/{raw-b35f9004.js → raw-0aecbbc9.js} +1 -1
- package/dist/{webimage-4ffaa38f.js → webimage-b4a1a024.js} +1 -1
- package/dist-tsc/Heatmap.d.ts +5 -2
- package/dist-tsc/Heatmap.d.ts.map +1 -1
- package/dist-tsc/Heatmap.js +6 -3
- package/dist-tsc/HeatmapTooltipSubscriber.js +4 -4
- package/package.json +9 -9
- package/src/Heatmap.js +6 -3
- package/src/HeatmapTooltipSubscriber.js +4 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-2a959f7f.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
package/dist-tsc/Heatmap.d.ts
CHANGED
|
@@ -23,8 +23,11 @@ export default Heatmap;
|
|
|
23
23
|
* @param {function} props.setGeneHighlight Callback function called on
|
|
24
24
|
* hover with the gene ID. Optional.
|
|
25
25
|
* @param {function} props.updateViewInfo Callback function that gets called with an
|
|
26
|
-
* object { uuid, project() } where
|
|
27
|
-
*
|
|
26
|
+
* object { uuid, project(), projectFromId() } where
|
|
27
|
+
* project is the DeckGL Viewport.project function, and
|
|
28
|
+
* projectFromId is a wrapper around project that
|
|
29
|
+
* takes (cellId, geneId) as parameters and returns
|
|
30
|
+
* canvas (x,y) pixel coordinates. Used to show tooltips. Optional.
|
|
28
31
|
* @param {boolean} props.transpose By default, false.
|
|
29
32
|
* @param {string} props.variablesTitle By default, 'Genes'.
|
|
30
33
|
* @param {string} props.observationsTitle By default, 'Cells'.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["../src/Heatmap.js"],"names":[],"mappings":";AAsDA
|
|
1
|
+
{"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["../src/Heatmap.js"],"names":[],"mappings":";AAsDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,2BAywBG"}
|
package/dist-tsc/Heatmap.js
CHANGED
|
@@ -43,8 +43,11 @@ function shouldUsePaddedImplementation(dataLength) {
|
|
|
43
43
|
* @param {function} props.setGeneHighlight Callback function called on
|
|
44
44
|
* hover with the gene ID. Optional.
|
|
45
45
|
* @param {function} props.updateViewInfo Callback function that gets called with an
|
|
46
|
-
* object { uuid, project() } where
|
|
47
|
-
*
|
|
46
|
+
* object { uuid, project(), projectFromId() } where
|
|
47
|
+
* project is the DeckGL Viewport.project function, and
|
|
48
|
+
* projectFromId is a wrapper around project that
|
|
49
|
+
* takes (cellId, geneId) as parameters and returns
|
|
50
|
+
* canvas (x,y) pixel coordinates. Used to show tooltips. Optional.
|
|
48
51
|
* @param {boolean} props.transpose By default, false.
|
|
49
52
|
* @param {string} props.variablesTitle By default, 'Genes'.
|
|
50
53
|
* @param {string} props.observationsTitle By default, 'Cells'.
|
|
@@ -174,7 +177,7 @@ const Heatmap = forwardRef((props, deckRef) => {
|
|
|
174
177
|
useEffect(() => {
|
|
175
178
|
updateViewInfo({
|
|
176
179
|
uuid,
|
|
177
|
-
|
|
180
|
+
projectFromId: (cellId, geneId) => {
|
|
178
181
|
const colI = transpose ? axisTopLabels.indexOf(cellId) : axisTopLabels.indexOf(geneId);
|
|
179
182
|
const rowI = transpose ? axisLeftLabels.indexOf(geneId) : axisLeftLabels.indexOf(cellId);
|
|
180
183
|
return heatmapToMousePosition(colI, rowI, {
|
|
@@ -8,14 +8,14 @@ export default function HeatmapTooltipSubscriber(props) {
|
|
|
8
8
|
const viewInfo = useComponentViewInfo(parentUuid);
|
|
9
9
|
const [cellInfo, cellCoord] = (obsHighlight && getObsInfo ? ([
|
|
10
10
|
getObsInfo(obsHighlight),
|
|
11
|
-
(viewInfo && viewInfo.
|
|
12
|
-
? viewInfo.
|
|
11
|
+
(viewInfo && viewInfo.projectFromId
|
|
12
|
+
? viewInfo.projectFromId(obsHighlight, null)[(transpose ? 0 : 1)]
|
|
13
13
|
: null),
|
|
14
14
|
]) : ([null, null]));
|
|
15
15
|
const [geneInfo, geneCoord] = (featureHighlight && getFeatureInfo ? ([
|
|
16
16
|
getFeatureInfo(featureHighlight),
|
|
17
|
-
(viewInfo && viewInfo.
|
|
18
|
-
? viewInfo.
|
|
17
|
+
(viewInfo && viewInfo.projectFromId
|
|
18
|
+
? viewInfo.projectFromId(null, featureHighlight)[(transpose ? 1 : 0)]
|
|
19
19
|
: null),
|
|
20
20
|
]) : ([null, null]));
|
|
21
21
|
const x = (transpose ? cellCoord : geneCoord);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/heatmap",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"plur": "^5.1.0",
|
|
22
22
|
"uuid": "^9.0.0",
|
|
23
|
-
"@vitessce/constants-internal": "3.0
|
|
24
|
-
"@vitessce/gl": "3.0
|
|
25
|
-
"@vitessce/legend": "3.0
|
|
26
|
-
"@vitessce/sets-utils": "3.0
|
|
27
|
-
"@vitessce/tooltip": "3.0
|
|
28
|
-
"@vitessce/utils": "3.0
|
|
29
|
-
"@vitessce/vit-s": "3.0
|
|
30
|
-
"@vitessce/workers": "3.0
|
|
23
|
+
"@vitessce/constants-internal": "3.1.0",
|
|
24
|
+
"@vitessce/gl": "3.1.0",
|
|
25
|
+
"@vitessce/legend": "3.1.0",
|
|
26
|
+
"@vitessce/sets-utils": "3.1.0",
|
|
27
|
+
"@vitessce/tooltip": "3.1.0",
|
|
28
|
+
"@vitessce/utils": "3.1.0",
|
|
29
|
+
"@vitessce/vit-s": "3.1.0",
|
|
30
|
+
"@vitessce/workers": "3.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^5.16.4",
|
package/src/Heatmap.js
CHANGED
|
@@ -76,8 +76,11 @@ function shouldUsePaddedImplementation(dataLength) {
|
|
|
76
76
|
* @param {function} props.setGeneHighlight Callback function called on
|
|
77
77
|
* hover with the gene ID. Optional.
|
|
78
78
|
* @param {function} props.updateViewInfo Callback function that gets called with an
|
|
79
|
-
* object { uuid, project() } where
|
|
80
|
-
*
|
|
79
|
+
* object { uuid, project(), projectFromId() } where
|
|
80
|
+
* project is the DeckGL Viewport.project function, and
|
|
81
|
+
* projectFromId is a wrapper around project that
|
|
82
|
+
* takes (cellId, geneId) as parameters and returns
|
|
83
|
+
* canvas (x,y) pixel coordinates. Used to show tooltips. Optional.
|
|
81
84
|
* @param {boolean} props.transpose By default, false.
|
|
82
85
|
* @param {string} props.variablesTitle By default, 'Genes'.
|
|
83
86
|
* @param {string} props.observationsTitle By default, 'Cells'.
|
|
@@ -269,7 +272,7 @@ const Heatmap = forwardRef((props, deckRef) => {
|
|
|
269
272
|
useEffect(() => {
|
|
270
273
|
updateViewInfo({
|
|
271
274
|
uuid,
|
|
272
|
-
|
|
275
|
+
projectFromId: (cellId, geneId) => {
|
|
273
276
|
const colI = transpose ? axisTopLabels.indexOf(cellId) : axisTopLabels.indexOf(geneId);
|
|
274
277
|
const rowI = transpose ? axisLeftLabels.indexOf(geneId) : axisLeftLabels.indexOf(cellId);
|
|
275
278
|
return heatmapToMousePosition(
|
|
@@ -16,8 +16,8 @@ export default function HeatmapTooltipSubscriber(props) {
|
|
|
16
16
|
const [cellInfo, cellCoord] = (obsHighlight && getObsInfo ? (
|
|
17
17
|
[
|
|
18
18
|
getObsInfo(obsHighlight),
|
|
19
|
-
(viewInfo && viewInfo.
|
|
20
|
-
? viewInfo.
|
|
19
|
+
(viewInfo && viewInfo.projectFromId
|
|
20
|
+
? viewInfo.projectFromId(obsHighlight, null)[(transpose ? 0 : 1)]
|
|
21
21
|
: null),
|
|
22
22
|
]
|
|
23
23
|
) : ([null, null]));
|
|
@@ -25,8 +25,8 @@ export default function HeatmapTooltipSubscriber(props) {
|
|
|
25
25
|
const [geneInfo, geneCoord] = (featureHighlight && getFeatureInfo ? (
|
|
26
26
|
[
|
|
27
27
|
getFeatureInfo(featureHighlight),
|
|
28
|
-
(viewInfo && viewInfo.
|
|
29
|
-
? viewInfo.
|
|
28
|
+
(viewInfo && viewInfo.projectFromId
|
|
29
|
+
? viewInfo.projectFromId(null, featureHighlight)[(transpose ? 1 : 0)]
|
|
30
30
|
: null),
|
|
31
31
|
]
|
|
32
32
|
) : ([null, null]));
|