Prepare Automatic Animation is missing in latest version

Dear Team,

We have upgraded the goJs library to latest version, In Previous version the below code was working but after upgrade it throws error. Please let me know is there any other replacement is available for this.

this.graph.diagram.animationManager.prepareAutomaticAnimation(“zoomToRect”);

Error:
ERROR TypeError: “this.graphDiagramRelatives.animationManager.prepareAutomaticAnimation is not a function”

Kindly provide your thoughts,

It appears that you have upgraded to version 2.1, which introduces support for custom animations and other features. Please read https://gojs.net/latest/changelog.html and https://gojs.net/latest/intro/animation.html

The internal method you were using no longer exists. I am guessing you want to create a custom Animation, but I do not know what you are trying to animate.