@kitware/vtk.js 22.5.3 → 22.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.
@@ -1,4 +1,4 @@
1
- import { vtkRenderWindow, IRenderWindowInitialValues } from '@kitware/vtk.js/Rendering/Rendering/Core/RenderWindow';
1
+ import vtkRenderWindow, { IRenderWindowInitialValues } from '@kitware/vtk.js/Rendering/Core/RenderWindow';
2
2
 
3
3
  // Keeps state for client / server scene synchronization.
4
4
  export interface SynchContext {
@@ -33,7 +33,7 @@ export interface IInitialValues extends IRenderWindowInitialValues {
33
33
 
34
34
  // Server-side view state.
35
35
  export interface ViewState {
36
- id: ViewId;
36
+ id: string;
37
37
  // vtk object type.
38
38
  type: string;
39
39
  // vtk object mtime.
@@ -57,7 +57,7 @@ function getPixelInformationWithData(buffdata, inDisplayPosition, maxDistance, o
57
57
  var displayPosition = [inDisplayPosition[0] - buffdata.area[0], inDisplayPosition[1] - buffdata.area[1]];
58
58
  var actorid = convert(displayPosition[0], displayPosition[1], buffdata.pixBuffer[PassTypes.ACTOR_PASS], buffdata.area);
59
59
 
60
- if (actorid <= 0) {
60
+ if (actorid <= 0 || actorid - idOffset >= buffdata.props.length) {
61
61
  // the pixel did not hit any actor.
62
62
  return null;
63
63
  }
@@ -520,7 +520,7 @@ function vtkOpenGLHardwareSelector(publicAPI, model) {
520
520
  var displayPosition = [inDisplayPosition[0] - model.area[0], inDisplayPosition[1] - model.area[1]];
521
521
  var actorid = convert(displayPosition[0], displayPosition[1], model.pixBuffer[PassTypes.ACTOR_PASS], model.area);
522
522
 
523
- if (actorid <= 0) {
523
+ if (actorid <= 0 || actorid - idOffset >= model.props.length) {
524
524
  // the pixel did not hit any actor.
525
525
  return null;
526
526
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "22.5.3",
3
+ "version": "22.5.4",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",