@kitware/vtk.js 24.18.2 → 24.18.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.
@@ -138,7 +138,10 @@ function vtkViewProxy(publicAPI, model) {
138
138
 
139
139
 
140
140
  publicAPI.setContainer = function (container) {
141
+ var orientationWidgetEnabled = model.orientationWidget.getEnabled();
142
+
141
143
  if (model.container) {
144
+ model.orientationWidget.setEnabled(false);
142
145
  model.interactor.unbindEvents(model.container);
143
146
  model.openglRenderWindow.setContainer(null);
144
147
  model.cornerAnnotation.setContainer(null);
@@ -151,6 +154,7 @@ function vtkViewProxy(publicAPI, model) {
151
154
  model.cornerAnnotation.setContainer(container);
152
155
  model.interactor.initialize();
153
156
  model.interactor.bindEvents(container);
157
+ model.orientationWidget.setEnabled(orientationWidgetEnabled);
154
158
  }
155
159
  }; // --------------------------------------------------------------------------
156
160
 
@@ -495,7 +499,21 @@ function vtkViewProxy(publicAPI, model) {
495
499
 
496
500
  publicAPI.focusTo = chain(model.camera.setFocalPoint, model.interactorStyle2D.setCenterOfRotation, model.interactorStyle3D.setCenterOfRotation); // --------------------------------------------------------------------------
497
501
 
498
- publicAPI.delete = chain(publicAPI.setContainer, model.openglRenderWindow.delete, publicAPI.delete); // --------------------------------------------------------------------------
502
+ publicAPI.delete = chain(function () {
503
+ publicAPI.setContainer(null);
504
+ model.orientationWidget.setEnabled(false);
505
+ model.orientationWidget.delete();
506
+ model.orientationAxesArrow.delete();
507
+ model.orientationAxesCube.delete();
508
+ model.interactorStyle2D.delete();
509
+ model.interactorStyle3D.delete();
510
+ model.cornerAnnotation.delete(); // in reverse order
511
+
512
+ model.interactor.delete();
513
+ model.renderer.delete();
514
+ model.openglRenderWindow.delete();
515
+ model.renderWindow.delete();
516
+ }, publicAPI.delete); // --------------------------------------------------------------------------
499
517
  // Initialization from state or input
500
518
  // --------------------------------------------------------------------------
501
519
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "24.18.2",
3
+ "version": "24.18.3",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",