-
Notifications
You must be signed in to change notification settings - Fork 4
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
development: use new keyframe support of vizzu + add slider #24
Comments
Also, with this change: vizzuhq/vizzu-lib@03653ad, the whole animation (containing start, end, intermediate charts + anim options) can be stored and restored. Using this feature could simplify the current code. chart.animate(...).then(chart => chart.animate(chart.animation.store())) |
@simzer I've removed the sub-slide concept and switched to keyframes - see my PR. Looks fine here. |
The animation control interface is changed. The animate method returns a promise, which still resolves when the animation is finished, but it does not incorporate the control methods. Instead, it contains another promise called 'activated', which resolves to the controller object when the animation starts. So doing something at the beginning of the animation looks like this: chart.animate({...}).activated.then(control => ...); For example storing the whole animation (start and end chart and the animation options between them: var animation;
chart.animate({...}).activated.then(control => {
animation = control.store();
}); Then resetting to a previously stored animation: chart.animate(animation) |
sorry, wrong issue, comment removed. |
After discussion with @dyuri: |
vizzuhq/vizzu-lib#166 fixed Animation can be played in reverse using these options: chart.animate(anim, { position: 1, direction: 'reverse' }); Working example: https://jsfiddle.net/simzer/tfmjsunr/19/ |
Vizzu now supports multiple animations in a single animation call:
Note: this feature is not released yet, but available from commit vizzuhq/vizzu-lib@3b73f2f
Available online here: https://vizzu-lib-main-sha.storage.googleapis.com/lib-3b73f2f/vizzu.js
The benefit of using this to pass slide phases together in one animate() call is that vizzu will consider this as a single animation.
This way adding a slider which can seek through all the phases becomes more simple.
The text was updated successfully, but these errors were encountered: