File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ var TweenManager = new Class({
160160
161161 makeActive : function ( tween )
162162 {
163+ if ( this . _add . indexOf ( tween ) !== - 1 || this . _active . indexOf ( tween ) !== - 1 )
164+ {
165+ return ;
166+ }
167+
163168 var idx = this . _pending . indexOf ( tween ) ;
164169
165170 if ( idx !== - 1 )
@@ -172,6 +177,8 @@ var TweenManager = new Class({
172177 tween . state = TWEEN_CONST . PENDING_ADD ;
173178
174179 this . _toProcess ++ ;
180+
181+ return this ;
175182 } ,
176183
177184 setGlobalTimeScale : require ( './components/SetGlobalTimeScale' ) ,
Original file line number Diff line number Diff line change @@ -131,6 +131,12 @@ var Tween = new Class({
131131 return this ;
132132 } ,
133133
134+ restart : function ( )
135+ {
136+ this . stop ( ) ;
137+ this . play ( ) ;
138+ } ,
139+
134140 calcDuration : require ( './components/CalcDuration' ) ,
135141 init : require ( './components/Init' ) ,
136142 nextState : require ( './components/NextState' ) ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ var Play = function (resetFromTimeline)
1010 {
1111 this . init ( ) ;
1212 this . parent . makeActive ( this ) ;
13+ resetFromTimeline = true ;
1314 }
1415
1516 var onStart = this . callbacks . onStart ;
@@ -46,7 +47,7 @@ var Play = function (resetFromTimeline)
4647 }
4748 else
4849 {
49- this . resetTweenData ( false ) ;
50+ this . resetTweenData ( resetFromTimeline ) ;
5051
5152 this . state = TWEEN_CONST . ACTIVE ;
5253
You can’t perform that action at this time.
0 commit comments