@vitessce/scatterplot 3.5.2 → 3.5.3

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, E, S, a, b, f, e, d, c } from "./index-0fd62e4a.js";
1
+ import { A, E, S, a, b, f, e, d, c } from "./index-e202be34.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-0fd62e4a.js";
1
+ import { B as BaseDecoder } from "./index-e202be34.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -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-0fd62e4a.js";
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,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-0fd62e4a.js";
1
+ import { B as BaseDecoder } from "./index-e202be34.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-0fd62e4a.js";
1
+ import { B as BaseDecoder } from "./index-e202be34.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-0fd62e4a.js";
1
+ import { B as BaseDecoder } from "./index-e202be34.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-0fd62e4a.js";
1
+ import { B as BaseDecoder } from "./index-e202be34.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1 +1 @@
1
- {"version":3,"file":"ScatterplotTooltipSubscriber.d.ts","sourceRoot":"","sources":["../src/ScatterplotTooltipSubscriber.js"],"names":[],"mappings":"AAIA,qFAiCC"}
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,0DAuCC"}
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: "pointer tool", onClick: () => setActiveTool(null), isActive: activeTool === null, children: _jsx(PointerIconSVG, {}) })), visibleTools.selectLasso ? (_jsx(IconTool, { alt: "select lasso", 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, {}) })] }));
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.2",
3
+ "version": "3.5.3",
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.2",
27
- "@vitessce/gl": "3.5.2",
28
- "@vitessce/icons": "3.5.2",
29
- "@vitessce/tooltip": "3.5.2",
30
- "@vitessce/utils": "3.5.2",
31
- "@vitessce/vit-s": "3.5.2"
26
+ "@vitessce/constants-internal": "3.5.3",
27
+ "@vitessce/gl": "3.5.3",
28
+ "@vitessce/icons": "3.5.3",
29
+ "@vitessce/tooltip": "3.5.3",
30
+ "@vitessce/utils": "3.5.3",
31
+ "@vitessce/vit-s": "3.5.3"
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 info={cellInfo} />
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="pointer tool"
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="select lasso"
132
+ alt={lassoIconAltText}
131
133
  onClick={() => setActiveTool(SELECTION_TYPE.POLYGON)}
132
134
  isActive={activeTool === SELECTION_TYPE.POLYGON}
133
135
  ><SelectLassoIconSVG />