This ensures that when Paper.resetViews() is called, any pending animation frame request is not leaked.
Motivation and Context
When resetViews() calls _resetUpdates() it's possible that there's an animation frame request, but _resetUpdates() was not checking for this and cancelling any such request, potentially causing updateViewsAsync() to be called when it shouldn't be.
This can cause unexpected behavior if the paper was frozen, or cause an error to be thrown if the paper is removed (since updateViewsAsync() with throw in such a case).
Description
This ensures that when
Paper.resetViews()
is called, any pending animation frame request is not leaked.Motivation and Context
When
resetViews()
calls_resetUpdates()
it's possible that there's an animation frame request, but_resetUpdates()
was not checking for this and cancelling any such request, potentially causingupdateViewsAsync()
to be called when it shouldn't be.This can cause unexpected behavior if the paper was frozen, or cause an error to be thrown if the paper is removed (since
updateViewsAsync()
with throw in such a case).