-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying a no-effect zoom animation causes an error #2614
Comments
maxkfranz
changed the title
Possible bug on cy.animate() function using a zoom configuration object to which the graph will be animated
Specifying a no-effect zoom animation causes an error
Jan 31, 2020
maxkfranz
added a commit
that referenced
this issue
Jan 31, 2020
… `{ level: 1 }` if an invalid zoom level is specified. The application of a zoom animation to the current zoom level is invalid. For example, animating from zoom:1 to zoom:1 doesn't make sense. When there is a case of an invalid zoom animation, the entire `zoom` animation value is discarded. This voids the animation. In the easing application routine, there is now an extra check for equal start and end values. While this does not affect the code path for the zoom:1 to zoom:1 example, it adds an extra layer of safety. Ref : Specifying a no-effect zoom animation causes an error #2614
maxkfranz
added a commit
that referenced
this issue
Feb 7, 2020
… `{ level: 1 }` if an invalid zoom level is specified. The application of a zoom animation to the current zoom level is invalid. For example, animating from zoom:1 to zoom:1 doesn't make sense. When there is a case of an invalid zoom animation, the entire `zoom` animation value is discarded. This voids the animation. In the easing application routine, there is now an extra check for equal start and end values. While this does not affect the code path for the zoom:1 to zoom:1 example, it adds an extra layer of safety. Ref : Specifying a no-effect zoom animation causes an error #2614
maxkfranz
added a commit
that referenced
this issue
Feb 7, 2020
… `{ level: 1 }` if an invalid zoom level is specified. The application of a zoom animation to the current zoom level is invalid. For example, animating from zoom:1 to zoom:1 doesn't make sense. When there is a case of an invalid zoom animation, the entire `zoom` animation value is discarded. This voids the animation. In the easing application routine, there is now an extra check for equal start and end values. While this does not affect the code path for the zoom:1 to zoom:1 example, it adds an extra layer of safety. Ref : Backport 3.12.x : Specifying a no-effect zoom animation causes an error #2625 #2614
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type
Bug report
Environment info
Current (buggy) behaviour
Animating elements using a zoom configuration object to which the graph will be animated causes cytoscape JS to error, using the following script:
On the browser console, the error is something like:
However, it is working properly when I animate using:
no matter how many times I execute the animate function.
Desired behaviour
Whether using any of those parameters, both animation should behave the same.
Actually, what I need to accomplish is to animate camera zoom to a particular node position, however, when I animate using a zoom configuration object, Cytoscape JS raises an error, hence the script immediately stop.
Minimum steps to reproduce
Run the following fork:
https://jsbin.com/qocuzim/1/edit?html,css,js,console,output
Clicking Button 1 everytime should not raises any error
Clicking Button 2 after the first zoom animation is completed will raise error.
The text was updated successfully, but these errors were encountered: