()
| 874 | }, |
| 875 | //PLAY/PAUSE button |
| 876 | play = function play() { |
| 877 | if (linkedAnimation.progress() >= outProgress / 100) { |
| 878 | _checkIndependence(linkedAnimation, vars); |
| 879 | |
| 880 | var target = linkedAnimation._targets && linkedAnimation._targets[0]; |
| 881 | |
| 882 | if (target === selectedAnimation) { |
| 883 | //in case there are callbacks on the timeline, when we jump back to the start we should seek() so that the playhead doesn't drag [backward] past those and trigger them. |
| 884 | target.seek(startTime + (endTime - startTime) * inProgress / 100); |
| 885 | } |
| 886 | |
| 887 | if (linkedAnimation._repeat && !inProgress) { |
| 888 | linkedAnimation.totalProgress(0, true); //for repeating animations, don't get stuck in the last iteration - jump all the way back to the start. |
| 889 | } else if (!linkedAnimation.reversed()) { |
| 890 | linkedAnimation.progress(inProgress / 100, true); |
| 891 | } |
| 892 | } |
| 893 | |
| 894 | playPauseMorph.play(); |
| 895 | linkedAnimation.resume(); |
| 896 | |
| 897 | if (paused) { |
| 898 | _self.update(); |
| 899 | } |
| 900 | |
| 901 | paused = false; |
| 902 | }, |
| 903 | pause = function pause() { |
| 904 | playPauseMorph.reverse(); |
| 905 |
no test coverage detected
searching dependent graphs…