@kitware/vtk.js 34.17.0 → 35.0.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.
@@ -137,7 +137,13 @@ function vtkArrowHandleRepresentation(publicAPI, model) {
137
137
 
138
138
  // --------------------------------------------------------------------------
139
139
 
140
- publicAPI.setGlyphResolution = macro.chain(publicAPI.setGlyphResolution, r => model._pipeline.glyph.setPhiResolution(r), r => model._pipeline.glyph.setThetaResolution(r));
140
+ const superSetGlyphResolution = publicAPI.setGlyphResolution;
141
+ publicAPI.setGlyphResolution = r => {
142
+ const res = superSetGlyphResolution(r);
143
+ model._pipeline.glyph.setPhiResolution(r);
144
+ model._pipeline.glyph.setThetaResolution(r);
145
+ return res;
146
+ };
141
147
 
142
148
  // --------------------------------------------------------------------------
143
149
 
@@ -12,6 +12,9 @@ import { Resolve } from '../../Rendering/Core/Mapper/Static.js';
12
12
  function vtkCircleContextRepresentation(publicAPI, model) {
13
13
  // Set our className
14
14
  model.classHierarchy.push('vtkCircleContextRepresentation');
15
+ const superClass = {
16
+ ...publicAPI
17
+ };
15
18
 
16
19
  // --------------------------------------------------------------------------
17
20
  // Generic rendering pipeline
@@ -23,15 +26,27 @@ function vtkCircleContextRepresentation(publicAPI, model) {
23
26
 
24
27
  // --------------------------------------------------------------------------
25
28
 
26
- publicAPI.setGlyphResolution = macro.chain(publicAPI.setGlyphResolution, model._pipeline.glyph.setResolution);
29
+ publicAPI.setGlyphResolution = r => {
30
+ const res = superClass.setGlyphResolution(r);
31
+ model._pipeline.glyph.setResolution(r);
32
+ return res;
33
+ };
27
34
 
28
35
  // --------------------------------------------------------------------------
29
36
 
30
- publicAPI.setDrawBorder = macro.chain(publicAPI.setDrawBorder, draw => model._pipeline.glyph.setLines(draw));
37
+ publicAPI.setDrawBorder = draw => {
38
+ const res = superClass.setDrawBorder(draw);
39
+ model._pipeline.glyph.setLines(draw);
40
+ return res;
41
+ };
31
42
 
32
43
  // --------------------------------------------------------------------------
33
44
 
34
- publicAPI.setDrawFace = macro.chain(publicAPI.setDrawFace, draw => model._pipeline.glyph.setFace(draw));
45
+ publicAPI.setDrawFace = draw => {
46
+ const res = superClass.setDrawFace(draw);
47
+ model._pipeline.glyph.setFace(draw);
48
+ return res;
49
+ };
35
50
 
36
51
  // --------------------------------------------------------------------------
37
52
 
@@ -112,11 +112,18 @@ function vtkSplineContextRepresentation(publicAPI, model) {
112
112
  model._pipelines.border.actor.getProperty().setColor(...(inPoints.length <= 3 || model._pipelines.area.filter.getErrorCount() === 0 ? model.borderColor : model.errorBorderColor));
113
113
  };
114
114
  publicAPI.getSelectedState = (prop, compositeID) => model.state;
115
- function updateAreaVisibility() {
116
- model._pipelines.area.actor.setVisibility(model.fill);
117
- }
118
- publicAPI.setFill = macro.chain(publicAPI.setFill, updateAreaVisibility);
119
- publicAPI.setOutputBorder = macro.chain(publicAPI.setOutputBorder, v => model._pipelines.border.actor.setVisibility(v));
115
+ const superSetFill = publicAPI.setFill;
116
+ publicAPI.setFill = fill => {
117
+ const res = superSetFill(fill);
118
+ model._pipelines.area.actor.setVisibility(fill);
119
+ return res;
120
+ };
121
+ const superSetOutputBorder = publicAPI.setOutputBorder;
122
+ publicAPI.setOutputBorder = v => {
123
+ const res = superSetOutputBorder(v);
124
+ model._pipelines.border.actor.setVisibility(v);
125
+ return res;
126
+ };
120
127
  }
121
128
 
122
129
  // ----------------------------------------------------------------------------
@@ -401,10 +401,13 @@ function vtkResliceCursorWidget(publicAPI, model) {
401
401
  res[viewType] = findRepresentationsForViewType(viewType)[0]?.getDisplayScaleParams?.();
402
402
  return res;
403
403
  }, {});
404
- publicAPI.setScaleInPixels = macro.chain(publicAPI.setScaleInPixels, scale => {
404
+ const superSetScaleInPixels = publicAPI.setScaleInPixels;
405
+ publicAPI.setScaleInPixels = scale => {
406
+ const res = superSetScaleInPixels(scale);
405
407
  publicAPI.getViewWidgets().forEach(w => w.setScaleInPixels(scale));
406
408
  updateState(model.widgetState, model.scaleInPixels, model.rotationHandlePosition);
407
- });
409
+ return res;
410
+ };
408
411
  publicAPI.getPlaneExtremities = viewType => {
409
412
  const dirProj = publicAPI.getWidgetState().getPlanes()[viewType].normal;
410
413
  const length = vtkBoundingBox.getDiagonalLength(publicAPI.getWidgetState().getImage().getBounds());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "34.17.0",
3
+ "version": "35.0.0",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",