(endResult)
| 2223 | |
| 2224 | animations.forEach((animation, idx) => { |
| 2225 | var cb = function(endResult) { |
| 2226 | hasEnded[idx] = true; |
| 2227 | doneCount++; |
| 2228 | if (doneCount === animations.length) { |
| 2229 | doneCount = 0; |
| 2230 | callback && callback(endResult); |
| 2231 | return; |
| 2232 | } |
| 2233 | |
| 2234 | if (!endResult.finished && stopTogether) { |
| 2235 | result.stop(); |
| 2236 | } |
| 2237 | }; |
| 2238 | |
| 2239 | if (!animation) { |
| 2240 | cb({finished: true}); |