@kitware/vtk.js 25.12.0 → 25.13.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.
@@ -119,7 +119,7 @@ function extend(publicAPI, model) {
119
119
  vtkProp.extend(publicAPI, model, initialValues);
120
120
  vtkInteractorObserver.extend(publicAPI, model, initialValues);
121
121
  macro.setGet(publicAPI, model, ['contextVisibility', 'handleVisibility', '_widgetManager']);
122
- macro.get(publicAPI, model, ['representations', 'widgetState']);
122
+ macro.get(publicAPI, model, ['representations', 'widgetState', 'activeState']);
123
123
  macro.moveToProtected(publicAPI, model, ['widgetManager']);
124
124
  macro.event(publicAPI, model, 'ActivateHandle');
125
125
  vtkAbstractWidget(publicAPI, model);
@@ -280,7 +280,7 @@ function vtkWidgetManager(publicAPI, model) {
280
280
 
281
281
  function _updateSelection() {
282
282
  _updateSelection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(callData, fromTouchEvent, callID) {
283
- var position, _yield$publicAPI$getS, requestCount, selectedState, representation, widget, activateHandle, i, w;
283
+ var position, _yield$publicAPI$getS, requestCount, selectedState, representation, widget, activateHandle, wantRender, i, w;
284
284
 
285
285
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
286
286
  while (1) {
@@ -325,12 +325,11 @@ function vtkWidgetManager(publicAPI, model) {
325
325
  // Default cursor behavior
326
326
  model._apiSpecificRenderWindow.setCursor(widget ? 'pointer' : 'default');
327
327
 
328
- if (model.widgetInFocus === widget && widget.hasFocus()) {
329
- activateHandle(widget); // Ken FIXME
330
-
331
- model._interactor.render();
328
+ wantRender = false;
332
329
 
333
- model._interactor.render();
330
+ if (model.widgetInFocus === widget && widget.hasFocus()) {
331
+ activateHandle(widget);
332
+ wantRender = true;
334
333
  } else {
335
334
  for (i = 0; i < model.widgets.length; i++) {
336
335
  w = model.widgets[i];
@@ -338,18 +337,19 @@ function vtkWidgetManager(publicAPI, model) {
338
337
  if (w === widget && w.getNestedPickable()) {
339
338
  activateHandle(w);
340
339
  model.activeWidget = w;
340
+ wantRender = true;
341
341
  } else {
342
+ wantRender || (wantRender = !!w.getActiveState());
342
343
  w.deactivateAllHandles();
343
344
  }
344
- } // Ken FIXME
345
-
346
-
347
- model._interactor.render();
345
+ }
346
+ }
348
347
 
348
+ if (wantRender) {
349
349
  model._interactor.render();
350
350
  }
351
351
 
352
- case 13:
352
+ case 15:
353
353
  case "end":
354
354
  return _context3.stop();
355
355
  }
@@ -603,7 +603,7 @@ function vtkWidgetManager(publicAPI, model) {
603
603
  model.selections = null;
604
604
 
605
605
  if (!model.pickingEnabled) {
606
- _context2.next = 24;
606
+ _context2.next = 26;
607
607
  break;
608
608
  }
609
609
 
@@ -639,7 +639,7 @@ function vtkWidgetManager(publicAPI, model) {
639
639
 
640
640
  case 16:
641
641
  if (!(!model._capturedBuffers || model.captureOn === CaptureOn.MOUSE_MOVE)) {
642
- _context2.next = 19;
642
+ _context2.next = 21;
643
643
  break;
644
644
  }
645
645
 
@@ -647,24 +647,28 @@ function vtkWidgetManager(publicAPI, model) {
647
647
  return captureBuffers(x, y, x, y);
648
648
 
649
649
  case 19:
650
+ _context2.next = 25;
651
+ break;
652
+
653
+ case 21:
650
654
  // or do we need a pixel that is outside the last capture?
651
655
  capturedRegion = model._capturedBuffers.area;
652
656
 
653
657
  if (!(x < capturedRegion[0] || x > capturedRegion[2] || y < capturedRegion[1] || y > capturedRegion[3])) {
654
- _context2.next = 23;
658
+ _context2.next = 25;
655
659
  break;
656
660
  }
657
661
 
658
- _context2.next = 23;
662
+ _context2.next = 25;
659
663
  return captureBuffers(x, y, x, y);
660
664
 
661
- case 23:
665
+ case 25:
662
666
  model.selections = model._capturedBuffers.generateSelection(x, y, x, y);
663
667
 
664
- case 24:
668
+ case 26:
665
669
  return _context2.abrupt("return", publicAPI.getSelectedData());
666
670
 
667
- case 25:
671
+ case 27:
668
672
  case "end":
669
673
  return _context2.stop();
670
674
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "25.12.0",
3
+ "version": "25.13.0",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",