-
Notifications
You must be signed in to change notification settings - Fork 315
Open
Labels
Description
Context
itowns/src/Controls/GlobeControls.js
Line 189 in c862ca7
| this.player = new AnimationPlayer(); |
The animationplayer is unique for every instance of globecontrols but the callback can be mixed up between multiple views.
for example, I have 2 different views here, and when I trigger an animation on VIEW-1, the VIEW-2 is also affected:
Screencast.from.07-10-2024.15.59.52.webm
Possible Cause/Fix/Solution
It seems to be this part of the code that is causing this issue:
itowns/src/Controls/GlobeControls.js
Lines 550 to 552 in c862ca7
| if (this.enableDamping && state === this.states.ORBIT && this.player.isStopped() && (sphericalDelta.theta > EPS || sphericalDelta.phi > EPS)) { | |
| this.player.setCallback(() => { this.update(this.states.ORBIT); }); | |
| this.player.playLater(durationDampingOrbital, 2); |
But as we can notice, player.stop() is also called in a lot of places... Maybe some code cleanup can be done concerning this player.
Reactions are currently unavailable