Comments (9)
About the callback:
// Inline SVG new Vivus('my-svg-id', {type: 'delayed', duration: 200}, myCallback); // Dynamic load new Vivus('my-div-id', {type: 'delayed', duration: 200, file: 'link/to/my.svg'}, myCallback);The Vivus constructor asks for 3 parameters:
- ID (or object) of DOM element to interact with.
It can be an inline SVG or a wrapper element to append an object tag from the optionfile
- Option object (described in the following)
- _Callback to call at the end of the animation (optional)_
from the readme.md
file
About the method play
:
play(speed)
Plays the animation with the speed given in parameter. This value can be negative to go backward, between 0 and 1 to go slowly, or superior to 1 to go fast. By default the value is 1.
from the readme.md
file
Btw, at no point Vivus use time for duration, but frames. Because browser can render at different speed depending on the heaviness of the page and performances of the machine. So to ensure a smooth animation Vivus use keyframes.
from vivus.
yeah but callback is working only with first animation it does not work when trigger play. Callback starts with staring animation than thats why I asked, I saw this in docs and it doesnt work with trigger .play()
Ok thanks for explenation of play(speed).
from vivus.
The callback is always triggered at the end of the animation. There's no
callback for when the animation start.
On 28 Aug 2015 8:03 am, "Szymon Dziewoński" [email protected]
wrote:
yeah but callback is working only with first animation it does not work
when trigger play. Callback starts with staring animation than thats why I
asked, I saw this in docs and it doesnt work with trigger .play()Ok thanks for explenation of play(speed).
—
Reply to this email directly or view it on GitHub
#65 (comment).
from vivus.
Yeah but it works on start Im gonna show you, recreate problem
http://esthechoc.vrs.ovh/index.html
kraften section and first dot on left bottom
On console in dev tools it triggers when animations starts not end
main.settings.js line 71 settings for this callback, line 64 function set
from vivus.
I'm sorry but on my machine, the callback is triggered at the end of the animation.
from vivus.
yeah on first animation - you are right. BUt then when u click another bullet and go back to first again you get callback on start animation. I checked it so many times..
from vivus.
The behavior is normal. You just trigger play on point1
when the previous section begin to appear. So the animation start before you can see it, and the callback is executed before you can see your point.
from vivus.
Ok now I think I get it,seems you were right all along, sorry for wasting
your time.
I did few tests on single objects, and now I see even with play(-speed) it
triggers too but at start as animation is backward
Thank you anyway for patience :)
2015-08-29 17:04 GMT+02:00 maxwellito [email protected]:
The behavior is normal. You just trigger play on point1 when the previous
section begin to appear. So the animation start before you can see it, and
the callback is executed before you can see your point.[image: screen shot 2015-08-29 at 16 01 53]
https://cloud.githubusercontent.com/assets/1097232/9562584/8e7e3800-4e67-11e5-80fa-5fd9ab7bfef9.png
[image: screen shot 2015-08-29 at 16 02 06]
https://cloud.githubusercontent.com/assets/1097232/9562585/91c3423a-4e67-11e5-87fb-9b5a0c5a5fdf.png—
Reply to this email directly or view it on GitHub
#65 (comment).
Pozdrawiam,
Szymon Dziewoński
www.szymondziewonski.com
http://www.szymondziewonski.com
from vivus.
no worries :-)
from vivus.
Related Issues (20)
- Trigger SVG to draw as soon as you see it (very large SVG) HOT 1
- Include Start delay without Loop HOT 3
- Is vivus deprecated? HOT 1
- daisy-chaining a series of images? HOT 2
- Beginner, unable to use HOT 8
- Support for Play Pause HOT 4
- Vivus MAP Array Empty, no animation rendered. HOT 2
- Problem using stroke based mask using multiple time the same SVG file
- Is there any rewind too?
- [Feature Request] Animate individual paths HOT 2
- [Error Fix]: There is a grammatical error on the index page. HOT 2
- Text is drawing immediately HOT 2
- Is there any option to draw svg on scroll? HOT 1
- No "ease-in-out" timing function? HOT 3
- Move a pencil while drawing ? HOT 1
- Integration with vue 3? HOT 4
- Callback function for when a path is completed? HOT 1
- Animation automatically replay
- Not working for a simple test HOT 2
- Please add Shuffle/Random animation type to Vivus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vivus.