@vitessce/scatterplot 3.8.0 → 3.8.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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-BumwWP-J.js";
2
+ import { B as BaseDecoder } from "./index-B9HtnmvK.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -105941,22 +105941,22 @@ function addDecoder(cases, importFn) {
105941
105941
  }
105942
105942
  cases.forEach((c2) => registry$1.set(c2, importFn));
105943
105943
  }
105944
- addDecoder([void 0, 1], () => import("./raw-DrfOM6es.js").then((m2) => m2.default));
105945
- addDecoder(5, () => import("./lzw-TJDvnCZk.js").then((m2) => m2.default));
105944
+ addDecoder([void 0, 1], () => import("./raw-DAqPf4b8.js").then((m2) => m2.default));
105945
+ addDecoder(5, () => import("./lzw-DdQkXqbQ.js").then((m2) => m2.default));
105946
105946
  addDecoder(6, () => {
105947
105947
  throw new Error("old style JPEG compression is not supported.");
105948
105948
  });
105949
- addDecoder(7, () => import("./jpeg-Dgjm5b-q.js").then((m2) => m2.default));
105950
- addDecoder([8, 32946], () => import("./deflate-BxyEnrsG.js").then((m2) => m2.default));
105951
- addDecoder(32773, () => import("./packbits-CUf4ETKT.js").then((m2) => m2.default));
105949
+ addDecoder(7, () => import("./jpeg-BRLf1BFV.js").then((m2) => m2.default));
105950
+ addDecoder([8, 32946], () => import("./deflate-B59Iec3_.js").then((m2) => m2.default));
105951
+ addDecoder(32773, () => import("./packbits-D7iShEMY.js").then((m2) => m2.default));
105952
105952
  addDecoder(
105953
105953
  34887,
105954
- () => import("./lerc-C4YXyd73.js").then(async (m2) => {
105954
+ () => import("./lerc-Bm1LBCBR.js").then(async (m2) => {
105955
105955
  await m2.zstd.init();
105956
105956
  return m2;
105957
105957
  }).then((m2) => m2.default)
105958
105958
  );
105959
- addDecoder(50001, () => import("./webimage-ol5Hkbkz.js").then((m2) => m2.default));
105959
+ addDecoder(50001, () => import("./webimage-DVQqsXwn.js").then((m2) => m2.default));
105960
105960
  function decodeRowAcc(row, stride) {
105961
105961
  let length2 = row.length - stride;
105962
105962
  let offset2 = 0;
@@ -137828,7 +137828,7 @@ function ToolMenu(props) {
137828
137828
  const {
137829
137829
  setActiveTool,
137830
137830
  activeTool,
137831
- visibleTools = { pan: true, selectLasso: true },
137831
+ visibleTools = { pan: true, selectLasso: true, recenter: true },
137832
137832
  recenterOnClick = () => {
137833
137833
  }
137834
137834
  } = props;
@@ -137852,7 +137852,7 @@ function ToolMenu(props) {
137852
137852
  isActive: activeTool === distEs6Exports$2.SELECTION_TYPE.POLYGON
137853
137853
  },
137854
137854
  /* @__PURE__ */ React__default.createElement(SvgSelectionLasso, null)
137855
- ) : null, /* @__PURE__ */ React__default.createElement(
137855
+ ) : null, visibleTools.recenter ? /* @__PURE__ */ React__default.createElement(
137856
137856
  IconButton,
137857
137857
  {
137858
137858
  alt: "click to recenter",
@@ -137860,7 +137860,7 @@ function ToolMenu(props) {
137860
137860
  "aria-label": "Recenter scatterplot view"
137861
137861
  },
137862
137862
  /* @__PURE__ */ React__default.createElement(CenterFocusStrong, null)
137863
- ));
137863
+ ) : null);
137864
137864
  }
137865
137865
  const getCursorWithTool = () => "crosshair";
137866
137866
  const getCursor = (interactionState) => interactionState.isDragging ? "grabbing" : "default";
@@ -138126,6 +138126,7 @@ class AbstractSpatialOrScatterplot extends PureComponent {
138126
138126
  viewState,
138127
138127
  uuid,
138128
138128
  hideTools,
138129
+ hideRecenter,
138129
138130
  orbitAxis
138130
138131
  } = this.props;
138131
138132
  const { gl, tool } = this.state;
@@ -138141,7 +138142,8 @@ class AbstractSpatialOrScatterplot extends PureComponent {
138141
138142
  setActiveTool: this.onToolChange,
138142
138143
  visibleTools: {
138143
138144
  pan: showPanTool && !hideTools,
138144
- selectLasso: showCellSelectionTools && !hideTools
138145
+ selectLasso: showCellSelectionTools && !hideTools,
138146
+ recenter: !hideRecenter
138145
138147
  },
138146
138148
  recenterOnClick: this.recenter
138147
138149
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, E, S, a, b, f, e, d, c } from "./index-BumwWP-J.js";
1
+ import { A, E, S, a, b, f, e, d, c } from "./index-B9HtnmvK.js";
2
2
  export {
3
3
  A as AbstractSpatialOrScatterplot,
4
4
  E as EmptyMessage,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BumwWP-J.js";
1
+ import { B as BaseDecoder } from "./index-B9HtnmvK.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-BumwWP-J.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-B9HtnmvK.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BumwWP-J.js";
1
+ import { B as BaseDecoder } from "./index-B9HtnmvK.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BumwWP-J.js";
1
+ import { B as BaseDecoder } from "./index-B9HtnmvK.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BumwWP-J.js";
1
+ import { B as BaseDecoder } from "./index-B9HtnmvK.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BumwWP-J.js";
1
+ import { B as BaseDecoder } from "./index-B9HtnmvK.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractSpatialOrScatterplot.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/AbstractSpatialOrScatterplot.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH;IACE,wBAeC;IAZC;;;MAGC;IACD,2BAAuB;IACvB,wBAAoB;IAStB;;;;;;;OAOG;IACH,gDAFG;QAAuB,SAAS,EAAxB,MAAM;KAChB,QAoCA;IAED;;;;;OAKG;IACH,mCAFG;QAA0B,QAAQ,EAA1B,MAAM;KAChB,QAGA;IAED;;;;;OAKG;IACH,uBAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,mBAFW,MAAM,QAQhB;IAgBD,qCAgFC;IAwCD;;MAEE;IAEF,iBAAa;IA1Ib;;;;;OAKG;IAEH,aALa,MAAM,EAAE,CAOpB;IAuFD;;;;;OAKG;IACH,iFAsBC;IAED;;OAEG;IAEH,2BAEC;IAQD;;;OAGG;IAEH,SAHa,OAAO,CAKnB;IAED;;;OAGG;IACH,sBA6DC;CACF"}
1
+ {"version":3,"file":"AbstractSpatialOrScatterplot.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/AbstractSpatialOrScatterplot.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH;IACE,wBAeC;IAZC;;;MAGC;IACD,2BAAuB;IACvB,wBAAoB;IAStB;;;;;;;OAOG;IACH,gDAFG;QAAuB,SAAS,EAAxB,MAAM;KAChB,QAoCA;IAED;;;;;OAKG;IACH,mCAFG;QAA0B,QAAQ,EAA1B,MAAM;KAChB,QAGA;IAED;;;;;OAKG;IACH,uBAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,mBAFW,MAAM,QAQhB;IAgBD,qCAgFC;IAwCD;;MAEE;IAEF,iBAAa;IA1Ib;;;;;OAKG;IAEH,aALa,MAAM,EAAE,CAOpB;IAuFD;;;;;OAKG;IACH,iFAsBC;IAED;;OAEG;IAEH,2BAEC;IAQD;;;OAGG;IAEH,SAHa,OAAO,CAKnB;IAED;;;OAGG;IACH,sBA8DC;CACF"}
@@ -236,7 +236,7 @@ export default class AbstractSpatialOrScatterplot extends PureComponent {
236
236
  * and Scatterplot components.
237
237
  */
238
238
  render() {
239
- const { deckRef, viewState, uuid, hideTools, orbitAxis, } = this.props;
239
+ const { deckRef, viewState, uuid, hideTools, hideRecenter, orbitAxis, } = this.props;
240
240
  const { gl, tool } = this.state;
241
241
  const layers = this.getLayers();
242
242
  const use3d = this.use3d();
@@ -251,6 +251,7 @@ export default class AbstractSpatialOrScatterplot extends PureComponent {
251
251
  return (_jsxs(_Fragment, { children: [_jsx(ToolMenu, { activeTool: tool, setActiveTool: this.onToolChange, visibleTools: {
252
252
  pan: showPanTool && !hideTools,
253
253
  selectLasso: showCellSelectionTools && !hideTools,
254
+ recenter: !hideRecenter,
254
255
  }, recenterOnClick: this.recenter }), _jsx(deck.DeckGL, { id: `deckgl-overlay-${uuid}`, ref: deckRef, views: [
255
256
  use3d
256
257
  ? new deck.OrbitView({ id: 'orbit', controller: true, orbitAxis })
@@ -1 +1 @@
1
- {"version":3,"file":"ToolMenu.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/ToolMenu.js"],"names":[],"mappings":"AAsEA,kDAeC;AAED,oDAeC;AAED,0DAyCC"}
1
+ {"version":3,"file":"ToolMenu.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/ToolMenu.js"],"names":[],"mappings":"AAsEA,kDAeC;AAED,oDAeC;AAED,0DA2CC"}
@@ -76,10 +76,10 @@ export function IconButton(props) {
76
76
  export default function ToolMenu(props) {
77
77
  const pointerIconAltText = 'Pointer tool';
78
78
  const lassoIconAltText = 'Select lasso';
79
- const { setActiveTool, activeTool, visibleTools = { pan: true, selectLasso: true }, recenterOnClick = () => { }, } = props;
79
+ const { setActiveTool, activeTool, visibleTools = { pan: true, selectLasso: true, recenter: true }, recenterOnClick = () => { }, } = props;
80
80
  const { classes } = useStyles();
81
81
  const onRecenterButtonCLick = () => {
82
82
  recenterOnClick();
83
83
  };
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, {}) })] }));
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, visibleTools.recenter ? (_jsx(IconButton, { alt: "click to recenter", onClick: () => onRecenterButtonCLick(), "aria-label": "Recenter scatterplot view", children: _jsx(CenterFocusStrong, {}) })) : null] }));
85
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -21,13 +21,13 @@
21
21
  "d3-quadtree": "^1.0.7",
22
22
  "lodash-es": "^4.17.21",
23
23
  "react-aria": "^3.28.0",
24
- "@vitessce/styles": "3.8.0",
25
- "@vitessce/constants-internal": "3.8.0",
26
- "@vitessce/gl": "3.8.0",
27
- "@vitessce/icons": "3.8.0",
28
- "@vitessce/tooltip": "3.8.0",
29
- "@vitessce/utils": "3.8.0",
30
- "@vitessce/vit-s": "3.8.0"
24
+ "@vitessce/styles": "3.8.2",
25
+ "@vitessce/constants-internal": "3.8.2",
26
+ "@vitessce/gl": "3.8.2",
27
+ "@vitessce/icons": "3.8.2",
28
+ "@vitessce/utils": "3.8.2",
29
+ "@vitessce/vit-s": "3.8.2",
30
+ "@vitessce/tooltip": "3.8.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@testing-library/jest-dom": "^6.6.3",
@@ -264,7 +264,7 @@ export default class AbstractSpatialOrScatterplot extends PureComponent {
264
264
  */
265
265
  render() {
266
266
  const {
267
- deckRef, viewState, uuid, hideTools, orbitAxis,
267
+ deckRef, viewState, uuid, hideTools, hideRecenter, orbitAxis,
268
268
  } = this.props;
269
269
  const { gl, tool } = this.state;
270
270
  const layers = this.getLayers();
@@ -290,6 +290,7 @@ export default class AbstractSpatialOrScatterplot extends PureComponent {
290
290
  visibleTools={{
291
291
  pan: showPanTool && !hideTools,
292
292
  selectLasso: showCellSelectionTools && !hideTools,
293
+ recenter: !hideRecenter,
293
294
  }}
294
295
  recenterOnClick={this.recenter}
295
296
  />
@@ -108,7 +108,7 @@ export default function ToolMenu(props) {
108
108
  const {
109
109
  setActiveTool,
110
110
  activeTool,
111
- visibleTools = { pan: true, selectLasso: true },
111
+ visibleTools = { pan: true, selectLasso: true, recenter: true },
112
112
  recenterOnClick = () => {},
113
113
  } = props;
114
114
  const { classes } = useStyles();
@@ -135,12 +135,14 @@ export default function ToolMenu(props) {
135
135
  ><SelectLassoIconSVG />
136
136
  </IconTool>
137
137
  ) : null}
138
- <IconButton
139
- alt="click to recenter"
140
- onClick={() => onRecenterButtonCLick()}
141
- aria-label="Recenter scatterplot view"
142
- ><CenterFocusStrong />
143
- </IconButton>
138
+ {visibleTools.recenter ? (
139
+ <IconButton
140
+ alt="click to recenter"
141
+ onClick={() => onRecenterButtonCLick()}
142
+ aria-label="Recenter scatterplot view"
143
+ ><CenterFocusStrong />
144
+ </IconButton>
145
+ ) : null}
144
146
  </div>
145
147
  );
146
148
  }