Skip to content

Commit

Permalink
initial trigger fix
Browse files Browse the repository at this point in the history
  • Loading branch information
moarwick committed Mar 25, 2017
1 parent c5f1fc5 commit 2a48d62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
6 changes: 2 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@ var MtSvgLines = function (_React$Component) {
_this._animStart = 0;
};

var initClassKey = 'mt-' + (0, _utils.shortUID)();

_this.state = {
classKey: initClassKey, // unique class name for the wrapper, an internal "trigger" (re-gen each time anim is to run)
classKey: 'mt-' + (0, _utils.shortUID)(), // unique class name for the wrapper, an internal "trigger" (re-gen each time anim is to run)
css: '', // generated CSS
tweenElapsed: 0, // tween duration so far (ms)
tweenProgress: 0 // tween completion (pct)
};

_this._lastAnimate = '';
_this._lastClassKey = initClassKey;
_this._lastClassKey = '';

_this._animStart = 0; // anim start timestamp

Expand Down
14 changes: 6 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,17 @@ export default class MtSvgLines extends React.Component {
constructor (props) {
super(props)

const initClassKey = `mt-${shortUID()}`

this.state = {
classKey: initClassKey, // unique class name for the wrapper, an internal "trigger" (re-gen each time anim is to run)
css: '', // generated CSS
tweenElapsed: 0, // tween duration so far (ms)
tweenProgress: 0 // tween completion (pct)
classKey: `mt-${shortUID()}`, // unique class name for the wrapper, an internal "trigger" (re-gen each time anim is to run)
css: '', // generated CSS
tweenElapsed: 0, // tween duration so far (ms)
tweenProgress: 0 // tween completion (pct)
}

this._lastAnimate = ''
this._lastClassKey = initClassKey
this._lastClassKey = ''

this._animStart = 0 // anim start timestamp
this._animStart = 0 // anim start timestamp

this._pathElems = []
this._pathDataFrom = {}
Expand Down

0 comments on commit 2a48d62

Please # to comment.