diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2016-03-25 00:03:31 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2016-03-25 00:03:31 +0100 |
commit | 3af6480ec315bbbd895e6b77e232661ac113c3ff (patch) | |
tree | 59a28a831fc0b42d33c86e4549c406857242b8c6 /dist/svg.js | |
parent | 000b071d04d67091c148cbe66e515e63b4b46986 (diff) | |
download | svg.js-3af6480ec315bbbd895e6b77e232661ac113c3ff.tar.gz svg.js-3af6480ec315bbbd895e6b77e232661ac113c3ff.zip |
fixed bug where loop wasnt correctly reversed if specified
Diffstat (limited to 'dist/svg.js')
-rw-r--r-- | dist/svg.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dist/svg.js b/dist/svg.js index b6d2c3c..8c1d8a5 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -6,7 +6,7 @@ * @copyright Wout Fierens <wout@impinc.co.uk> * @license MIT * -* BUILT: Thu Mar 24 2016 23:31:03 GMT+0100 (Mitteleuropäische Zeit) +* BUILT: Fri Mar 25 2016 00:01:14 GMT+0100 (Mitteleuropäische Zeit) */; (function(root, factory) { if (typeof define === 'function' && define.amd) { @@ -1314,6 +1314,7 @@ SVG.Situation = SVG.invent({ create: function(o){ this.init = false this.reversed = false + this.reversing = false this.duration = o.duration this.delay = o.delay @@ -1631,7 +1632,7 @@ SVG.FX = SVG.invent({ // store current loop and total loops this.current.loop = times || true - if(reverse) return this.reverse() + if(reverse) this.last().reversing = true return this } @@ -1757,11 +1758,6 @@ SVG.FX = SVG.invent({ // adds one property to the animations , add: function(method, args, type){ - //if(this.situations.length){ - // this.situations[this.situations.length-1][type || 'animations'][method] = args - //}else{ - // this.current[type || 'animations'][method] = args - //} this.last()[type || 'animations'][method] = args setTimeout(function(){this.start()}.bind(this), 0) return this @@ -1777,6 +1773,11 @@ SVG.FX = SVG.invent({ if(!ignoreTime) this.pos = this.timeToPos(+new Date) if(this.pos >= 1 && (this.current.loop === true || (typeof this.current.loop == 'number' && --this.current.loop))){ + + if(this.current.reversing){ + this.current.reversed = !this.current.reversed + console.log('asd') + } return this.seek(this.pos-1) } |