Skip to content

Commit 0f6d364

Browse files
sedghifloryst
authored andcommitted
fix(renderWindowInterActor): use empty mouse event object
1 parent 832f259 commit 0f6d364

File tree

1 file changed

+5
-11
lines changed
  • Sources/Rendering/Core/RenderWindowInteractor

1 file changed

+5
-11
lines changed

Sources/Rendering/Core/RenderWindowInteractor/index.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,11 @@ const { vtkWarningMacro, vtkErrorMacro, normalizeWheel, vtkOnceErrorMacro } =
1111
// Global methods
1212
// ----------------------------------------------------------------------------
1313

14-
let EMPTY_MOUSE_EVENT;
15-
if (typeof MouseEvent !== 'undefined') {
16-
EMPTY_MOUSE_EVENT = new MouseEvent('');
17-
} else {
18-
// Provide a fallback or handle differently for web worker context
19-
EMPTY_MOUSE_EVENT = {
20-
ctrlKey: false,
21-
altKey: false,
22-
shiftKey: false,
23-
};
24-
}
14+
const EMPTY_MOUSE_EVENT = {
15+
ctrlKey: false,
16+
altKey: false,
17+
shiftKey: false,
18+
};
2519

2620
const deviceInputMap = {
2721
'xr-standard': [

0 commit comments

Comments
 (0)