@vitessce/scatterplot 3.5.2 → 3.5.4
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-c981dfb9.js → deflate-2e95fa57.js} +1 -1
- package/dist/{index-0fd62e4a.js → index-e202be34.js} +1256 -1302
- package/dist/index.js +1 -1
- package/dist/{jpeg-cb535ab0.js → jpeg-fc2a9942.js} +1 -1
- package/dist/{lerc-263d6f89.js → lerc-5b2b9693.js} +1 -1
- package/dist/{lzw-12f5daf8.js → lzw-b3932ffd.js} +1 -1
- package/dist/{packbits-7d462060.js → packbits-2f89ef73.js} +1 -1
- package/dist/{raw-686ef1b1.js → raw-003e472f.js} +1 -1
- package/dist/{webimage-07e9e96a.js → webimage-de1437b0.js} +1 -1
- package/dist-tsc/ScatterplotTooltipSubscriber.d.ts.map +1 -1
- package/dist-tsc/ScatterplotTooltipSubscriber.js +2 -2
- package/dist-tsc/shared-spatial-scatterplot/ToolMenu.d.ts.map +1 -1
- package/dist-tsc/shared-spatial-scatterplot/ToolMenu.js +3 -1
- package/package.json +7 -7
- package/src/ScatterplotTooltipSubscriber.js +7 -1
- package/src/shared-spatial-scatterplot/ToolMenu.js +4 -2
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-e202be34.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScatterplotTooltipSubscriber.d.ts","sourceRoot":"","sources":["../src/ScatterplotTooltipSubscriber.js"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"ScatterplotTooltipSubscriber.d.ts","sourceRoot":"","sources":["../src/ScatterplotTooltipSubscriber.js"],"names":[],"mappings":"AAIA,qFAuCC"}
|
|
@@ -3,12 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { Tooltip2D, TooltipContent } from '@vitessce/tooltip';
|
|
4
4
|
import { useComponentHover, useComponentViewInfo } from '@vitessce/vit-s';
|
|
5
5
|
export default function ScatterplotTooltipSubscriber(props) {
|
|
6
|
-
const { parentUuid, obsHighlight, width, height, getObsInfo, } = props;
|
|
6
|
+
const { parentUuid, obsHighlight, width, height, getObsInfo, featureType, featureLabelsMap, } = props;
|
|
7
7
|
const sourceUuid = useComponentHover();
|
|
8
8
|
const viewInfo = useComponentViewInfo(parentUuid);
|
|
9
9
|
const [cellInfo, x, y] = (obsHighlight && getObsInfo ? ([
|
|
10
10
|
getObsInfo(obsHighlight),
|
|
11
11
|
...(viewInfo && viewInfo.projectFromId ? viewInfo.projectFromId(obsHighlight) : [null, null]),
|
|
12
12
|
]) : ([null, null, null]));
|
|
13
|
-
return ((cellInfo ? (_jsx(Tooltip2D, { x: x, y: y, parentUuid: parentUuid, sourceUuid: sourceUuid, parentWidth: width, parentHeight: height, children: _jsx(TooltipContent, { info: cellInfo }) })) : null));
|
|
13
|
+
return ((cellInfo ? (_jsx(Tooltip2D, { x: x, y: y, parentUuid: parentUuid, sourceUuid: sourceUuid, parentWidth: width, parentHeight: height, children: _jsx(TooltipContent, { info: cellInfo, featureType: featureType, featureLabelsMap: featureLabelsMap }) })) : null));
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolMenu.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/ToolMenu.js"],"names":[],"mappings":"AAsEA,kDAeC;AAED,oDAeC;AAED,
|
|
1
|
+
{"version":3,"file":"ToolMenu.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/ToolMenu.js"],"names":[],"mappings":"AAsEA,kDAeC;AAED,oDAeC;AAED,0DAyCC"}
|
|
@@ -74,10 +74,12 @@ export function IconButton(props) {
|
|
|
74
74
|
return (_jsx("button", { className: clsx(classes.toolIcon, classes.toolButton), onClick: onClick, type: "button", title: alt, children: children }));
|
|
75
75
|
}
|
|
76
76
|
export default function ToolMenu(props) {
|
|
77
|
+
const pointerIconAltText = 'Pointer tool';
|
|
78
|
+
const lassoIconAltText = 'Select lasso';
|
|
77
79
|
const { setActiveTool, activeTool, visibleTools = { pan: true, selectLasso: true }, recenterOnClick = () => { }, } = props;
|
|
78
80
|
const classes = useStyles();
|
|
79
81
|
const onRecenterButtonCLick = () => {
|
|
80
82
|
recenterOnClick();
|
|
81
83
|
};
|
|
82
|
-
return (_jsxs("div", { className: classes.tool, children: [visibleTools.pan && (_jsx(IconTool, { alt:
|
|
84
|
+
return (_jsxs("div", { className: classes.tool, children: [visibleTools.pan && (_jsx(IconTool, { alt: pointerIconAltText, onClick: () => setActiveTool(null), isActive: activeTool === null, children: _jsx(PointerIconSVG, {}) })), visibleTools.selectLasso ? (_jsx(IconTool, { alt: lassoIconAltText, onClick: () => setActiveTool(SELECTION_TYPE.POLYGON), isActive: activeTool === SELECTION_TYPE.POLYGON, children: _jsx(SelectLassoIconSVG, {}) })) : null, _jsx(IconButton, { alt: "click to recenter", onClick: () => onRecenterButtonCLick(), "aria-label": "Recenter scatterplot view", children: _jsx(CenterFocusStrong, {}) })] }));
|
|
83
85
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.4",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"d3-quadtree": "^1.0.7",
|
|
24
24
|
"lodash-es": "^4.17.21",
|
|
25
25
|
"react-aria": "^3.28.0",
|
|
26
|
-
"@vitessce/constants-internal": "3.5.
|
|
27
|
-
"@vitessce/gl": "3.5.
|
|
28
|
-
"@vitessce/icons": "3.5.
|
|
29
|
-
"@vitessce/tooltip": "3.5.
|
|
30
|
-
"@vitessce/utils": "3.5.
|
|
31
|
-
"@vitessce/vit-s": "3.5.
|
|
26
|
+
"@vitessce/constants-internal": "3.5.4",
|
|
27
|
+
"@vitessce/gl": "3.5.4",
|
|
28
|
+
"@vitessce/icons": "3.5.4",
|
|
29
|
+
"@vitessce/tooltip": "3.5.4",
|
|
30
|
+
"@vitessce/utils": "3.5.4",
|
|
31
|
+
"@vitessce/vit-s": "3.5.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.4",
|
|
@@ -9,6 +9,8 @@ export default function ScatterplotTooltipSubscriber(props) {
|
|
|
9
9
|
width,
|
|
10
10
|
height,
|
|
11
11
|
getObsInfo,
|
|
12
|
+
featureType,
|
|
13
|
+
featureLabelsMap,
|
|
12
14
|
} = props;
|
|
13
15
|
|
|
14
16
|
const sourceUuid = useComponentHover();
|
|
@@ -31,7 +33,11 @@ export default function ScatterplotTooltipSubscriber(props) {
|
|
|
31
33
|
parentWidth={width}
|
|
32
34
|
parentHeight={height}
|
|
33
35
|
>
|
|
34
|
-
<TooltipContent
|
|
36
|
+
<TooltipContent
|
|
37
|
+
info={cellInfo}
|
|
38
|
+
featureType={featureType}
|
|
39
|
+
featureLabelsMap={featureLabelsMap}
|
|
40
|
+
/>
|
|
35
41
|
</Tooltip2D>
|
|
36
42
|
) : null)
|
|
37
43
|
);
|
|
@@ -103,6 +103,8 @@ export function IconButton(props) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
export default function ToolMenu(props) {
|
|
106
|
+
const pointerIconAltText = 'Pointer tool';
|
|
107
|
+
const lassoIconAltText = 'Select lasso';
|
|
106
108
|
const {
|
|
107
109
|
setActiveTool,
|
|
108
110
|
activeTool,
|
|
@@ -119,7 +121,7 @@ export default function ToolMenu(props) {
|
|
|
119
121
|
<div className={classes.tool}>
|
|
120
122
|
{visibleTools.pan && (
|
|
121
123
|
<IconTool
|
|
122
|
-
alt=
|
|
124
|
+
alt={pointerIconAltText}
|
|
123
125
|
onClick={() => setActiveTool(null)}
|
|
124
126
|
isActive={activeTool === null}
|
|
125
127
|
><PointerIconSVG />
|
|
@@ -127,7 +129,7 @@ export default function ToolMenu(props) {
|
|
|
127
129
|
)}
|
|
128
130
|
{visibleTools.selectLasso ? (
|
|
129
131
|
<IconTool
|
|
130
|
-
alt=
|
|
132
|
+
alt={lassoIconAltText}
|
|
131
133
|
onClick={() => setActiveTool(SELECTION_TYPE.POLYGON)}
|
|
132
134
|
isActive={activeTool === SELECTION_TYPE.POLYGON}
|
|
133
135
|
><SelectLassoIconSVG />
|