Skip to content

Commit f7176bb

Browse files
committed
fix(RenderWindowInteractor): Don't bind unserializable object on model
1 parent 19d1659 commit f7176bb

File tree

1 file changed

+7
-8
lines changed
  • Sources/Rendering/Core/RenderWindowInteractor

1 file changed

+7
-8
lines changed

Sources/Rendering/Core/RenderWindowInteractor/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
6565
model.classHierarchy.push('vtkRenderWindowInteractor');
6666

6767
// Initialize list of requesters
68-
model.animationRequesters = new Set();
68+
const animationRequesters = new Set();
6969

7070
// Public API methods
7171

@@ -268,11 +268,11 @@ function vtkRenderWindowInteractor(publicAPI, model) {
268268
vtkErrorMacro(`undefined requester, can not start animating`);
269269
return;
270270
}
271-
if (model.animationRequesters.has(requestor)) {
271+
if (animationRequesters.has(requestor)) {
272272
return;
273273
}
274-
model.animationRequesters.add(requestor);
275-
if (model.animationRequesters.size === 1) {
274+
animationRequesters.add(requestor);
275+
if (animationRequesters.size === 1) {
276276
model.lastFrameTime = 0.1;
277277
model.lastFrameStart = Date.now();
278278
model.animationRequest = requestAnimationFrame(publicAPI.handleAnimation);
@@ -284,12 +284,12 @@ function vtkRenderWindowInteractor(publicAPI, model) {
284284
model.vrAnimation || model.animationRequest !== null;
285285

286286
publicAPI.cancelAnimation = (requestor) => {
287-
if (!model.animationRequesters.has(requestor)) {
287+
if (!animationRequesters.has(requestor)) {
288288
vtkWarningMacro(`${requestor} did not request an animation`);
289289
return;
290290
}
291-
model.animationRequesters.delete(requestor);
292-
if (model.animationRequest && model.animationRequesters.size === 0) {
291+
animationRequesters.delete(requestor);
292+
if (model.animationRequest && animationRequesters.size === 0) {
293293
cancelAnimationFrame(model.animationRequest);
294294
model.animationRequest = null;
295295
publicAPI.endAnimationEvent();
@@ -871,7 +871,6 @@ const DEFAULT_VALUES = {
871871
recognizeGestures: true,
872872
currentGesture: 'Start',
873873
animationRequest: null,
874-
animationRequesters: null,
875874
lastFrameTime: 0.1,
876875
wheelTimeoutID: 0,
877876
moveTimeoutID: 0,

0 commit comments

Comments
 (0)