diff options
author | wout <wout@impinc.co.uk> | 2014-01-23 20:20:25 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-01-23 20:20:25 +0100 |
commit | f776294c7b8dde1f327fc6138d4de6c136088fbc (patch) | |
tree | 7dc67503a77d304ee950adc9a7a40a6c9aedcca1 /README.md | |
parent | 551e3d6bb980bca77f2abf606a25bc2fc8a02534 (diff) | |
download | svg.js-f776294c7b8dde1f327fc6138d4de6c136088fbc.tar.gz svg.js-f776294c7b8dde1f327fc6138d4de6c136088fbc.zip |
Added pause / play to SVG.FX module and bumped to v0.34
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -781,6 +781,16 @@ You can also animate non-numeric unit values unsing the `attr()` method: rect.animate().attr('x', '10%').animate().attr('x', '50%') ``` +### Pausing and playing animations +Pausing and playing an animations is fairly straightforward: + +```javascript +rect.animate().move(200, 200) + +rect.mouseenter(function() { this.pause() }) +rect.mouseleave(function() { this.play() }) +``` + ### Stopping animations Animations can be stopped in two ways. @@ -798,6 +808,8 @@ rect.animate().move(200, 200) rect.animate().center(200, 200) ``` +Stopping an animation is irreversable. + ### Synchronising animations If you want to perform your own actions during the animations you can use the `during()` method: |