Skip to content

Commit db7bc92

Browse files
authored
Merge pull request Kitware#2453 from Kitware/fix-mousemove-pointer
fix(RenderWindowInteractor): trigger mousemove
2 parents f4596c5 + 1e535f8 commit db7bc92

File tree

1 file changed

+13
-13
lines changed
  • Sources/Rendering/Core/RenderWindowInteractor

1 file changed

+13
-13
lines changed

Sources/Rendering/Core/RenderWindowInteractor/index.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,17 @@ function vtkRenderWindowInteractor(publicAPI, model) {
384384
if (pointerCache.has(event.pointerId)) {
385385
const pointer = pointerCache.get(event.pointerId);
386386
pointer.position = getScreenEventPositionFor(event);
387+
}
387388

388-
switch (event.pointerType) {
389-
case 'pen':
390-
case 'touch':
391-
publicAPI.handleTouchMove(event);
392-
break;
393-
case 'mouse':
394-
default:
395-
publicAPI.handleMouseMove(event);
396-
break;
397-
}
389+
switch (event.pointerType) {
390+
case 'pen':
391+
case 'touch':
392+
publicAPI.handleTouchMove(event);
393+
break;
394+
case 'mouse':
395+
default:
396+
publicAPI.handleMouseMove(event);
397+
break;
398398
}
399399
};
400400

@@ -728,7 +728,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
728728
}
729729
// handle the gesture
730730
publicAPI.recognizeGesture('TouchStart', positions);
731-
} else {
731+
} else if (pointers.length === 1) {
732732
const callData = {
733733
...getModifierKeysFor(EMPTY_MOUSE_EVENT),
734734
position: getScreenEventPositionFor(event),
@@ -743,7 +743,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
743743
if (model.recognizeGestures && pointers.length > 1) {
744744
const positions = pointerCacheToPositions(pointerCache);
745745
publicAPI.recognizeGesture('TouchMove', positions);
746-
} else {
746+
} else if (pointers.length === 1) {
747747
const callData = {
748748
...getModifierKeysFor(EMPTY_MOUSE_EVENT),
749749
position: pointers[0].position,
@@ -780,7 +780,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
780780
const positions = pointerCacheToPositions(pointerCache);
781781
publicAPI.recognizeGesture('TouchMove', positions);
782782
}
783-
} else {
783+
} else if (pointers.length === 1) {
784784
const callData = {
785785
...getModifierKeysFor(EMPTY_MOUSE_EVENT),
786786
position: pointers[0].position,

0 commit comments

Comments
 (0)