Skip to content

Commit

Permalink
Merge pull request #12637 from carolhmj/fix-pointer-hover
Browse files Browse the repository at this point in the history
Fix pointer hover on descendant controls when action manager is recursive
  • Loading branch information
carolhmj committed Jun 7, 2022
2 parents e2b48da + 84aef26 commit b0d1958
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/dev/core/src/Inputs/scene.inputManager.ts
Expand Up @@ -205,13 +205,10 @@ export class InputManager {
if (isMeshPicked) {
scene.setPointerOverMesh(pickResult!.pickedMesh, evt.pointerId, pickResult);

if (this._pointerOverMesh && this._pointerOverMesh.actionManager && this._pointerOverMesh.actionManager.hasPointerTriggers) {
if (!scene.doNotHandleCursors && canvas) {
if (this._pointerOverMesh.actionManager.hoverCursor) {
canvas.style.cursor = this._pointerOverMesh.actionManager.hoverCursor;
} else {
canvas.style.cursor = scene.hoverCursor;
}
if (!scene.doNotHandleCursors && canvas && this._pointerOverMesh) {
const actionManager = this._pointerOverMesh._getActionManagerForTrigger();
if (actionManager && actionManager.hasPointerTriggers) {
canvas.style.cursor = actionManager.hoverCursor || scene.hoverCursor;
}
}
} else {
Expand Down

0 comments on commit b0d1958

Please sign in to comment.