(endResult)
| 215 | |
| 216 | animations.forEach((animation, idx) => { |
| 217 | var cb = function(endResult) { |
| 218 | hasEnded[idx] = true; |
| 219 | doneCount++; |
| 220 | if (doneCount === animations.length) { |
| 221 | doneCount = 0; |
| 222 | callback && callback(endResult); |
| 223 | return; |
| 224 | } |
| 225 | |
| 226 | if (!endResult.finished && stopTogether) { |
| 227 | result.stop(); |
| 228 | } |
| 229 | }; |
| 230 | |
| 231 | if (!animation) { |
| 232 | cb({finished: true}); |